├── .babelrc ├── .eslintrc.json ├── .gitignore ├── .jsdoc.json ├── CNAME ├── README.md ├── build ├── coverage │ ├── ast.js.html │ ├── base.css │ ├── block-navigation.js │ ├── doc.js.html │ ├── engine.js.html │ ├── guppy.js.html │ ├── index.html │ ├── keyboard.js.html │ ├── lcov.info │ ├── lib │ │ ├── katex │ │ │ ├── index.html │ │ │ └── katex-modified.min.js.html │ │ └── mousetrap │ │ │ ├── index.html │ │ │ └── mousetrap.min.js.html │ ├── parser.js.html │ ├── prettify.css │ ├── prettify.js │ ├── settings.js.html │ ├── sort-arrow-sprite.png │ ├── sorter.js │ ├── src │ │ ├── ast.js.html │ │ ├── doc.js.html │ │ ├── engine.js.html │ │ ├── guppy.js.html │ │ ├── index.html │ │ ├── keyboard.js.html │ │ ├── parser.js.html │ │ ├── settings.js.html │ │ ├── symbols.js.html │ │ ├── utils.js.html │ │ └── version.js.html │ ├── sym │ │ ├── index.html │ │ └── symbols.json.html │ ├── symbols.js.html │ ├── utils.js.html │ └── version.js.html ├── fonts │ ├── KaTeX_AMS-Regular.eot │ ├── KaTeX_AMS-Regular.ttf │ ├── KaTeX_AMS-Regular.woff │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.eot │ ├── KaTeX_Caligraphic-Bold.ttf │ ├── KaTeX_Caligraphic-Bold.woff │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.eot │ ├── KaTeX_Caligraphic-Regular.ttf │ ├── KaTeX_Caligraphic-Regular.woff │ ├── KaTeX_Caligraphic-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.eot │ ├── KaTeX_Fraktur-Bold.ttf │ ├── KaTeX_Fraktur-Bold.woff │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Fraktur-Regular.eot │ ├── KaTeX_Fraktur-Regular.ttf │ ├── KaTeX_Fraktur-Regular.woff │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-Bold.eot │ ├── KaTeX_Main-Bold.ttf │ ├── KaTeX_Main-Bold.woff │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-Italic.eot │ ├── KaTeX_Main-Italic.ttf │ ├── KaTeX_Main-Italic.woff │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.eot │ ├── KaTeX_Main-Regular.ttf │ ├── KaTeX_Main-Regular.woff │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-BoldItalic.eot │ ├── KaTeX_Math-BoldItalic.ttf │ ├── KaTeX_Math-BoldItalic.woff │ ├── KaTeX_Math-BoldItalic.woff2 │ ├── KaTeX_Math-Italic.eot │ ├── KaTeX_Math-Italic.ttf │ ├── KaTeX_Math-Italic.woff │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_Math-Regular.eot │ ├── KaTeX_Math-Regular.ttf │ ├── KaTeX_Math-Regular.woff │ ├── KaTeX_Math-Regular.woff2 │ ├── KaTeX_SansSerif-Bold.eot │ ├── KaTeX_SansSerif-Bold.ttf │ ├── KaTeX_SansSerif-Bold.woff │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.eot │ ├── KaTeX_SansSerif-Italic.ttf │ ├── KaTeX_SansSerif-Italic.woff │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.eot │ ├── KaTeX_SansSerif-Regular.ttf │ ├── KaTeX_SansSerif-Regular.woff │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Script-Regular.eot │ ├── KaTeX_Script-Regular.ttf │ ├── KaTeX_Script-Regular.woff │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Size1-Regular.eot │ ├── KaTeX_Size1-Regular.ttf │ ├── KaTeX_Size1-Regular.woff │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.eot │ ├── KaTeX_Size2-Regular.ttf │ ├── KaTeX_Size2-Regular.woff │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.eot │ ├── KaTeX_Size3-Regular.ttf │ ├── KaTeX_Size3-Regular.woff │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.eot │ ├── KaTeX_Size4-Regular.ttf │ ├── KaTeX_Size4-Regular.woff │ ├── KaTeX_Size4-Regular.woff2 │ ├── KaTeX_Typewriter-Regular.eot │ ├── KaTeX_Typewriter-Regular.ttf │ ├── KaTeX_Typewriter-Regular.woff │ └── KaTeX_Typewriter-Regular.woff2 ├── guppy-default-osk.min.css ├── guppy-default.min.css ├── guppy-none-osk.min.css ├── guppy-none.min.css ├── guppy-test.js ├── guppy.js ├── guppy.min.js ├── guppy_osk.js ├── guppy_osk.min.js ├── icons │ ├── help.png │ ├── keyboard.png │ ├── settings.png │ └── symbols.png └── package.json ├── deploy.json ├── index.html ├── karma.conf.js ├── lib ├── icons │ ├── help.png │ ├── if_141_Keyboard_183265.png │ ├── if_141_Keyboard_183265.svg │ ├── if_icon-help_211675.png │ ├── if_icon-help_211675.svg │ ├── if_settings_326699.png │ ├── if_settings_326699.svg │ ├── keyboard.png │ ├── settings.png │ └── symbols.png ├── katex │ ├── fonts │ │ ├── KaTeX_AMS-Regular.ttf │ │ ├── KaTeX_AMS-Regular.woff │ │ ├── KaTeX_AMS-Regular.woff2 │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ ├── KaTeX_Caligraphic-Regular.woff2 │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ ├── KaTeX_Fraktur-Bold.woff │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ ├── KaTeX_Fraktur-Regular.woff │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ ├── KaTeX_Main-Bold.ttf │ │ ├── KaTeX_Main-Bold.woff │ │ ├── KaTeX_Main-Bold.woff2 │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ ├── KaTeX_Main-BoldItalic.woff │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ ├── KaTeX_Main-Italic.ttf │ │ ├── KaTeX_Main-Italic.woff │ │ ├── KaTeX_Main-Italic.woff2 │ │ ├── KaTeX_Main-Regular.ttf │ │ ├── KaTeX_Main-Regular.woff │ │ ├── KaTeX_Main-Regular.woff2 │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ ├── KaTeX_Math-BoldItalic.woff │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ ├── KaTeX_Math-Italic.ttf │ │ ├── KaTeX_Math-Italic.woff │ │ ├── KaTeX_Math-Italic.woff2 │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ ├── KaTeX_SansSerif-Bold.woff │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ ├── KaTeX_SansSerif-Italic.woff │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ ├── KaTeX_SansSerif-Regular.woff │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ ├── KaTeX_Script-Regular.ttf │ │ ├── KaTeX_Script-Regular.woff │ │ ├── KaTeX_Script-Regular.woff2 │ │ ├── KaTeX_Size1-Regular.ttf │ │ ├── KaTeX_Size1-Regular.woff │ │ ├── KaTeX_Size1-Regular.woff2 │ │ ├── KaTeX_Size2-Regular.ttf │ │ ├── KaTeX_Size2-Regular.woff │ │ ├── KaTeX_Size2-Regular.woff2 │ │ ├── KaTeX_Size3-Regular.ttf │ │ ├── KaTeX_Size3-Regular.woff │ │ ├── KaTeX_Size3-Regular.woff2 │ │ ├── KaTeX_Size4-Regular.ttf │ │ ├── KaTeX_Size4-Regular.woff │ │ ├── KaTeX_Size4-Regular.woff2 │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ ├── KaTeX_Typewriter-Regular.woff │ │ └── KaTeX_Typewriter-Regular.woff2 │ ├── katex-modified.min.css │ └── katex-modified.min.js ├── math-expressions │ └── math-expressions.js └── mousetrap │ └── mousetrap.min.js ├── osk_rollup.config.js ├── package-lock.json ├── package.json ├── rollup.config.js ├── site ├── api │ └── guppy-js │ │ ├── 2.0.0-alpha.1 │ │ ├── Doc.html │ │ ├── Engine.html │ │ ├── Guppy.html │ │ ├── GuppyOSK.html │ │ ├── doc.js.html │ │ ├── engine.js.html │ │ ├── guppy.js.html │ │ ├── index.html │ │ ├── osk.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ └── styles │ │ │ ├── jsdoc.css │ │ │ └── prettify.css │ │ ├── 2.0.0-beta.1 │ │ ├── Doc.html │ │ ├── Engine.html │ │ ├── Guppy.html │ │ ├── GuppyOSK.html │ │ ├── doc.js.html │ │ ├── engine.js.html │ │ ├── guppy.js.html │ │ ├── index.html │ │ ├── osk.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ └── styles │ │ │ ├── jsdoc.css │ │ │ └── prettify.css │ │ ├── 2.0.0-beta.3 │ │ ├── Doc.html │ │ ├── Engine.html │ │ ├── Guppy.html │ │ ├── GuppyOSK.html │ │ ├── doc.js.html │ │ ├── engine.js.html │ │ ├── guppy.js.html │ │ ├── index.html │ │ ├── osk.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ └── styles │ │ │ ├── jsdoc.css │ │ │ └── prettify.css │ │ └── 2.0.0-rc.1 │ │ ├── Doc.html │ │ ├── Engine.html │ │ ├── Guppy.html │ │ ├── GuppyOSK.html │ │ ├── doc.js.html │ │ ├── engine.js.html │ │ ├── guppy.js.html │ │ ├── index.html │ │ ├── osk.js.html │ │ ├── scripts │ │ ├── linenumber.js │ │ └── prettify │ │ │ ├── Apache-License-2.0.txt │ │ │ ├── lang-css.js │ │ │ └── prettify.js │ │ └── styles │ │ ├── jsdoc.css │ │ └── prettify.css ├── build.sh ├── contribute │ ├── _src │ │ └── index.html │ └── index.html ├── doc │ ├── _src │ │ ├── faq.md │ │ ├── format.md │ │ ├── index.md │ │ ├── internals.md │ │ ├── quickstart.html │ │ ├── render.md │ │ ├── roadmap.md │ │ ├── script.md │ │ ├── style.md │ │ ├── symbols.md │ │ └── version.md │ ├── faq.html │ ├── format.html │ ├── guides.json │ ├── index.html │ ├── internals.html │ ├── quickstart.html │ ├── render.html │ ├── roadmap.html │ ├── script.html │ ├── style.html │ ├── symbols.html │ └── version.html ├── examples │ ├── _src │ │ └── index.html │ ├── article │ │ ├── article.html │ │ ├── codepen_hash │ │ └── index.html │ ├── basic │ │ ├── basic.html │ │ ├── codepen_hash │ │ └── index.html │ ├── calc │ │ ├── calc.html │ │ ├── codepen_hash │ │ └── index.html │ ├── cubic │ │ └── index.html │ ├── events │ │ ├── codepen_hash │ │ ├── events.html │ │ └── index.html │ ├── graph │ │ ├── codepen_hash │ │ ├── fabric.min.js │ │ ├── graph.html │ │ └── index.html │ ├── import │ │ ├── codepen_hash │ │ ├── import.html │ │ └── index.html │ ├── index.html │ ├── io │ │ ├── codepen_hash │ │ ├── index.html │ │ └── io.html │ ├── osk │ │ └── index.html │ ├── quiz │ │ ├── codepen_hash │ │ ├── index.html │ │ └── quiz.html │ └── template.html ├── index.css ├── index.html ├── index.js ├── style │ ├── guppy.css │ └── osk.css ├── sym │ ├── extra_symbols.json │ └── symbols.json └── template.html ├── src ├── ast.js ├── doc.js ├── engine.js ├── guppy.js ├── keyboard.js ├── osk.js ├── parser.js ├── settings.js ├── symbols.js ├── utils.js └── version.js ├── style ├── guppy.css └── osk.css ├── sym ├── number_theory.json └── symbols.json └── test ├── index.html └── test.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "es2015", 5 | { 6 | "modules": false 7 | } 8 | ] 9 | ], 10 | "plugins": [ 11 | "external-helpers" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | OLD 2 | *~ 3 | \#* 4 | *.pyc 5 | *.tmp 6 | node_modules 7 | *.o 8 | *.so 9 | *.a 10 | -------------------------------------------------------------------------------- /.jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "allowUnknownTags": true, 4 | "dictionaries": ["jsdoc"] 5 | }, 6 | "source": { 7 | "include": ["src", "package.json", "README.md"], 8 | "includePattern": ".js$", 9 | "excludePattern": "(node_modules/)" 10 | }, 11 | "plugins": [ 12 | "plugins/markdown" 13 | ], 14 | "templates": { 15 | "cleverLinks": false, 16 | "monospaceLinks": true, 17 | "useLongnameInNav": false, 18 | "showInheritedInNav": true 19 | }, 20 | "opts": { 21 | "destination": "./site/api", 22 | "encoding": "utf8", 23 | "private": true, 24 | "recurse": true, 25 | "template": "./node_modules/docdash", 26 | "package": "deploy.json" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | guppy.js.org 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Guppy 2 | 3 | [![Join the chat at https://gitter.im/guppy-mathbox/Lobby](https://badges.gitter.im/guppy-mathbox/Lobby.svg)](https://gitter.im/guppy-mathbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | ## Synopsis 6 | 7 | Guppy is a Javascript-based WYSIWYG editor for mathematics whose 8 | content is stored in an XML format that makes Guppy mathematical 9 | expressions **searchable**, **parseable**, and **renderable**. 10 | 11 | The content of the editor can easily be extracted in a well-annotated 12 | XML format (for searching), as well as LaTeX (for rendering), plain 13 | text (for text applications) or a syntax tree (for 14 | manipulating/evaluating). 15 | 16 | ## Demos 17 | 18 | A full live demo can be found at 19 | [http://daniel3735928559.github.io/guppy/site](http://daniel3735928559.github.io/guppy/site) 20 | 21 | A standalone basic demo can be found at 22 | [http://daniel3735928559.github.io/guppy/site/examples/basic](http://daniel3735928559.github.io/guppy/site/examples/basic) 23 | 24 | ## How do I get started? 25 | 26 | Go to the [quickstart page](https://daniel3735928559.github.io/guppy/site/doc/quickstart). 27 | 28 | Also check the [FAQ](https://daniel3735928559.github.io/guppy/site/doc/faq.html). 29 | 30 | ## Can I see some examples? 31 | 32 | Yes! There are many at the [examples page](https://daniel3735928559.github.io/guppy/site/examples). 33 | 34 | Of particular note are: 35 | 36 | * [Calc](https://daniel3735928559.github.io/guppy/site/examples/calc) Numerically evaluate a guppy document. 37 | * [Input/Output](https://daniel3735928559.github.io/guppy/site/examples/io) Import and extract editor content. 38 | * [Mobile](https://daniel3735928559.github.io/guppy/site/examples/osk) Activate mobile keyboard functionality. 39 | * [Style](https://daniel3735928559.github.io/guppy/site/doc/style.html) Style the editor with CSS. 40 | * [Article](https://daniel3735928559.github.io/guppy/site/examples/article) Use guppy to render pre-existing mathematical content on a page. 41 | 42 | ## How does it work? 43 | 44 | Editor content is stored in a specific [XML format](https://daniel3735928559.github.io/guppy/site/doc/format.html). 45 | Editing operations then correspond to [operations on that XML](https://daniel3735928559.github.io/guppy/site/doc/internals.html). 46 | 47 | ## Can I help? 48 | 49 | Yes! See the [contributors page](https://daniel3735928559.github.io/guppy/site/contribute) for how, and the 50 | [roadmap](https://daniel3735928559.github.io/guppy/site/doc/roadmap.html) 51 | for an idea of where the project is heading. 52 | 53 | ## License 54 | 55 | Guppy is licensed under the [MIT License](http://opensource.org/licenses/MIT). 56 | -------------------------------------------------------------------------------- /build/coverage/block-navigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var jumpToCode = (function init () { 3 | // Classes of code we would like to highlight 4 | var missingCoverageClasses = [ '.cbranch-no', '.cstat-no', '.fstat-no' ]; 5 | 6 | // We don't want to select elements that are direct descendants of another match 7 | var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` 8 | 9 | // Selecter that finds elements on the page to which we can jump 10 | var selector = notSelector + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` 11 | 12 | // The NodeList of matching elements 13 | var missingCoverageElements = document.querySelectorAll(selector); 14 | 15 | var currentIndex; 16 | 17 | function toggleClass(index) { 18 | missingCoverageElements.item(currentIndex).classList.remove('highlighted'); 19 | missingCoverageElements.item(index).classList.add('highlighted'); 20 | } 21 | 22 | function makeCurrent(index) { 23 | toggleClass(index); 24 | currentIndex = index; 25 | missingCoverageElements.item(index) 26 | .scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' }); 27 | } 28 | 29 | function goToPrevious() { 30 | var nextIndex = 0; 31 | if (typeof currentIndex !== 'number' || currentIndex === 0) { 32 | nextIndex = missingCoverageElements.length - 1; 33 | } else if (missingCoverageElements.length > 1) { 34 | nextIndex = currentIndex - 1; 35 | } 36 | 37 | makeCurrent(nextIndex); 38 | } 39 | 40 | function goToNext() { 41 | var nextIndex = 0; 42 | 43 | if (typeof currentIndex === 'number' && currentIndex < (missingCoverageElements.length - 1)) { 44 | nextIndex = currentIndex + 1; 45 | } 46 | 47 | makeCurrent(nextIndex); 48 | } 49 | 50 | return function jump(event) { 51 | switch (event.which) { 52 | case 78: // n 53 | case 74: // j 54 | goToNext(); 55 | break; 56 | case 66: // b 57 | case 75: // k 58 | case 80: // p 59 | goToPrevious(); 60 | break; 61 | } 62 | }; 63 | }()); 64 | window.addEventListener('keydown', jumpToCode); 65 | -------------------------------------------------------------------------------- /build/coverage/lib/katex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for lib/katex 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files lib/katex 20 |

21 |
22 |
23 | 57.72% 24 | Statements 25 | 1425/2469 26 |
27 |
28 | 47.53% 29 | Branches 30 | 951/2001 31 |
32 |
33 | 60.92% 34 | Functions 35 | 279/458 36 |
37 |
38 | 100% 39 | Lines 40 | 3/3 41 |
42 |
43 |

44 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 45 |

46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
FileStatementsBranchesFunctionsLines
katex-modified.min.js
57.72%1425/246947.53%951/200160.92%279/458100%3/3
79 |
80 |
81 | 85 | 86 | 87 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /build/coverage/lib/mousetrap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for lib/mousetrap 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files lib/mousetrap 20 |

21 |
22 |
23 | 78.68% 24 | Statements 25 | 107/136 26 |
27 |
28 | 48.45% 29 | Branches 30 | 78/161 31 |
32 |
33 | 62.5% 34 | Functions 35 | 20/32 36 |
37 |
38 | 100% 39 | Lines 40 | 11/11 41 |
42 |
43 |

44 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 45 |

46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
FileStatementsBranchesFunctionsLines
mousetrap.min.js
78.68%107/13648.45%78/16162.5%20/32100%11/11
79 |
80 |
81 | 85 | 86 | 87 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /build/coverage/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /build/coverage/sort-arrow-sprite.png: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | IHDR�F�3tEXtSoftwareAdobe ImageReadyq�e<sIDATxڼRA� ������D���e[ � 4 | �HfFX� g�f���3�Dd F�w�-˘�� 5 | � n�g�M+OVں�=�""/�ĥ'Y���?H�hV� �@��p���Y�8Bwc,�IEND�B`� -------------------------------------------------------------------------------- /build/coverage/src/version.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for src/version.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files / src version.js 20 |

21 |
22 |
23 | 75% 24 | Statements 25 | 6/8 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 0% 34 | Functions 35 | 0/2 36 |
37 |
38 | 75% 39 | Lines 40 | 6/8 41 |
42 |
43 |

44 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 45 |

46 |
47 |
48 |

 49 | 
 92 | 
1 50 | 2 51 | 3 52 | 4 53 | 5 54 | 6 55 | 7 56 | 8 57 | 9 58 | 10 59 | 11 60 | 12 61 | 13 62 | 14 63 | 151x 64 | 1x 65 | 1x 66 | 1x 67 |   68 | 1x 69 |   70 |   71 |   72 | 1x 73 |   74 |   75 |   76 |   77 |  
var Version = {}
 78 | Version.GUPPY_VERSION = "2.0.0-alpha.1";
 79 | Version.DOC_VERSION = "1.2.0";
 80 | Version.SYMBOL_VERSION = "2.0.0-alpha.3";
 81 |  
 82 | Version.DOC_ERROR = function(id, found_ver){
 83 |     throw Error("Document version mismatch for " + id + ": Found " + found_ver + ", required " + Version.DOC_VERSION + ".  To update your document, please see daniel3735928559.github.io/guppy/doc/version.html");
 84 | }
 85 |  
 86 | Version.SYMBOL_ERROR = function(id, found_ver){
 87 |     throw Error("Symbol version mismatch for " + id + ": Found " + found_ver + ", required " + Version.SYMBOL_VERSION + ".  To update your document, please see daniel3735928559.github.io/guppy/doc/version.html");
 88 | }
 89 | export default Version
 90 |  
 91 |  
93 |
94 |
95 | 99 | 100 | 101 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /build/coverage/sym/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for sym 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files sym 20 |

21 |
22 |
23 | 100% 24 | Statements 25 | 29/29 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 100% 34 | Functions 35 | 0/0 36 |
37 |
38 | 100% 39 | Lines 40 | 29/29 41 |
42 |
43 |

44 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 45 |

46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
FileStatementsBranchesFunctionsLines
symbols.json
100%29/29100%0/0100%0/0100%29/29
79 |
80 |
81 | 85 | 86 | 87 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /build/coverage/version.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Code coverage report for version.js 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 |
18 |

19 | All files version.js 20 |

21 |
22 |
23 | 75% 24 | Statements 25 | 6/8 26 |
27 |
28 | 100% 29 | Branches 30 | 0/0 31 |
32 |
33 | 0% 34 | Functions 35 | 0/2 36 |
37 |
38 | 75% 39 | Lines 40 | 6/8 41 |
42 |
43 |

44 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 45 |

46 |
47 |
48 |

 49 | 
 92 | 
1 50 | 2 51 | 3 52 | 4 53 | 5 54 | 6 55 | 7 56 | 8 57 | 9 58 | 10 59 | 11 60 | 12 61 | 13 62 | 14 63 | 151x 64 | 1x 65 | 1x 66 | 1x 67 |   68 | 1x 69 |   70 |   71 |   72 | 1x 73 |   74 |   75 |   76 |   77 |  
var Version = {}
 78 | Version.GUPPY_VERSION = "2.0.0-alpha.1";
 79 | Version.DOC_VERSION = "1.2.0";
 80 | Version.SYMBOL_VERSION = "2.0.0-alpha.3";
 81 |  
 82 | Version.DOC_ERROR = function(id, found_ver){
 83 |     throw Error("Document version mismatch for " + id + ": Found " + found_ver + ", required " + Version.DOC_VERSION + ".  To update your document, please see daniel3735928559.github.io/guppy/doc/version.html");
 84 | }
 85 |  
 86 | Version.SYMBOL_ERROR = function(id, found_ver){
 87 |     throw Error("Symbol version mismatch for " + id + ": Found " + found_ver + ", required " + Version.SYMBOL_VERSION + ".  To update your document, please see daniel3735928559.github.io/guppy/doc/version.html");
 88 | }
 89 | export default Version
 90 |  
 91 |  
93 |
94 |
95 | 99 | 100 | 101 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /build/fonts/KaTeX_AMS-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_AMS-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Bold.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Bold.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Bold.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Italic.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-BoldItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-BoldItalic.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Italic.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Math-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Math-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Bold.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Italic.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Script-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Script-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size1-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size1-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size2-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size2-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size3-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size3-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size4-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size4-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /build/fonts/KaTeX_Typewriter-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Typewriter-Regular.eot -------------------------------------------------------------------------------- /build/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /build/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /build/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /build/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/icons/help.png -------------------------------------------------------------------------------- /build/icons/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/icons/keyboard.png -------------------------------------------------------------------------------- /build/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/icons/settings.png -------------------------------------------------------------------------------- /build/icons/symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/build/icons/symbols.png -------------------------------------------------------------------------------- /build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guppy-js", 3 | "version": "2.0.0-beta.3", 4 | "description": "WYSIWYG mathematics equation editor", 5 | "repository": "git+https://github.com/daniel3735928559/guppy.git", 6 | "keywords": [ 7 | "math", 8 | "wysiwyg", 9 | "equation", 10 | "editor" 11 | ], 12 | "author": "daniel3735928559", 13 | "license": "MIT", 14 | "bugs": { 15 | "url": "https://github.com/daniel3735928559/guppy/issues" 16 | }, 17 | "homepage": "https://daniel3735928559.github.io/guppy" 18 | } 19 | -------------------------------------------------------------------------------- /deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guppy-js", 3 | "version": "2.0.0-rc.1", 4 | "description": "WYSIWYG mathematics equation editor", 5 | "repository": "git+https://github.com/daniel3735928559/guppy.git", 6 | "keywords": [ 7 | "math", 8 | "wysiwyg", 9 | "equation", 10 | "editor" 11 | ], 12 | "author": "daniel3735928559", 13 | "license": "MIT", 14 | "bugs": { 15 | "url": "https://github.com/daniel3735928559/guppy/issues" 16 | }, 17 | "homepage": "https://daniel3735928559.github.io/guppy" 18 | } 19 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Sat Nov 10 2018 11:22:46 GMT-0500 (Eastern Standard Time) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | // frameworks to use 11 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 12 | frameworks: ['jasmine'], 13 | 14 | // list of files / patterns to load in the browser 15 | files: [ 16 | {'included':false,'served':true,'pattern':'build/icons/*.png'}, 17 | {'included':false,'served':true,'pattern':'build/fonts/*'}, 18 | {'included':false,'served':true,'pattern':'sym/symbols.json'}, 19 | 'build/guppy-default.min.css', 20 | 'build/guppy-test.js', 21 | 'test/test.js' 22 | ], 23 | 24 | 25 | // list of files / patterns to exclude 26 | exclude: [ 27 | ], 28 | 29 | 30 | // preprocess matching files before serving them to the browser 31 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 32 | preprocessors: { 33 | }, 34 | 35 | 36 | // test results reporter to use 37 | // possible values: 'dots', 'progress' 38 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 39 | reporters: ['progress','coverage-istanbul'], 40 | coverageIstanbulReporter: { 41 | dir : 'build/coverage/', 42 | reports: ['html','lcovonly','text-summary'], 43 | skipFilesWithNoCoverage: true 44 | }, 45 | 46 | // web server port 47 | port: 9876, 48 | 49 | 50 | // enable / disable colors in the output (reporters and logs) 51 | colors: true, 52 | 53 | 54 | // level of logging 55 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 56 | logLevel: config.LOG_INFO, 57 | 58 | 59 | // enable / disable watching file and executing tests whenever any file changes 60 | autoWatch: false, 61 | 62 | 63 | // start these browsers 64 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 65 | browsers: ['Chrome'], 66 | 67 | 68 | // Continuous Integration mode 69 | // if true, Karma captures browsers, runs the tests and exits 70 | singleRun: true, 71 | 72 | // Concurrency level 73 | // how many browser should be started simultaneous 74 | concurrency: 1 75 | }) 76 | } 77 | -------------------------------------------------------------------------------- /lib/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/help.png -------------------------------------------------------------------------------- /lib/icons/if_141_Keyboard_183265.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/if_141_Keyboard_183265.png -------------------------------------------------------------------------------- /lib/icons/if_141_Keyboard_183265.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/icons/if_icon-help_211675.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/if_icon-help_211675.png -------------------------------------------------------------------------------- /lib/icons/if_icon-help_211675.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/icons/if_settings_326699.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/if_settings_326699.png -------------------------------------------------------------------------------- /lib/icons/if_settings_326699.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/icons/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/keyboard.png -------------------------------------------------------------------------------- /lib/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/settings.png -------------------------------------------------------------------------------- /lib/icons/symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/icons/symbols.png -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /lib/katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel3735928559/guppy/1759992a3885cb99d3ead04241f318a074c9f963/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /lib/mousetrap/mousetrap.min.js: -------------------------------------------------------------------------------- 1 | /* mousetrap v1.6.1 craig.is/killing/mice */ 2 | (function(r,v,f){function w(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return p[a.which]?p[a.which]:t[a.which]?t[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a){return"shift"==a||"ctrl"==a||"alt"==a|| 3 | "meta"==a}function B(a,b){var g,c,d,f=[];g=a;"+"===g?g=["+"]:(g=g.replace(/\+{2}/g,"+plus"),g=g.split("+"));for(d=0;dq||p.hasOwnProperty(q)&&(n[p[q]]=q)}d=n[g]?"keydown":"keypress"}"keypress"==d&&f.length&&(d="keydown");return{key:c,modifiers:f,action:d}}function E(a,b){return null===a||a===v?!1:a===b?!0:E(a.parentNode,b)}function c(a){function b(a){a= 4 | a||{};var b=!1,l;for(l in n)a[l]?b=!0:n[l]=0;b||(y=!1)}function g(a,b,u,e,c,g){var l,m,k=[],f=u.type;if(!h._callbacks[a])return[];"keyup"==f&&x(a)&&(b=[a]);for(l=0;l":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter", 9 | escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(f=1;20>f;++f)p[111+f]="f"+f;for(f=0;9>=f;++f)p[f+96]=f.toString();c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={}; 10 | this._directMap={};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||E(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(p[b]=a[b]);n=null};c.init=function(){var a=c(v),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a, 11 | arguments)}}(b))};c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null); 12 | -------------------------------------------------------------------------------- /osk_rollup.config.js: -------------------------------------------------------------------------------- 1 | import commonjs from 'rollup-plugin-commonjs'; 2 | import babel from 'rollup-plugin-babel'; 3 | import { uglify } from 'rollup-plugin-uglify'; 4 | 5 | export default { 6 | input: 'src/osk.js', 7 | output: {name:'GuppyOSK', 8 | file:process.env.NODE_ENV === 'production' ? 'build/guppy_osk.min.js' : 'build/guppy_osk.js', 9 | format: 'iife'}, 10 | plugins: [ 11 | commonjs({ 12 | include: [ 13 | 'lib/katex/**' 14 | ] 15 | }), 16 | babel({ 17 | exclude: 'node_modules/**', 18 | presets: [['es2015', { "modules": false }]] 19 | }), 20 | (process.env.NODE_ENV === 'production' && uglify()), 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "guppy-dev", 3 | "version": "2.0.0-rc.1", 4 | "description": "WYSIWYG mathematics equation editor", 5 | "directories": { 6 | "doc": "site/docs", 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "all": "npm run-script lint && npm test && npm run-script build-css && npm run-script build-debug && npm run-script build", 11 | "build-test": "NODE_ENV=test node_modules/.bin/rollup -c", 12 | "test": "NODE_ENV=test node_modules/.bin/rollup -c && node_modules/.bin/karma start karma.conf.js", 13 | "build": "NODE_ENV=production node_modules/.bin/rollup -c && NODE_ENV=production node_modules/.bin/rollup -c osk_rollup.config.js", 14 | "build-debug": "node_modules/.bin/rollup -c && node_modules/.bin/rollup -c osk_rollup.config.js", 15 | "build-css": "./node_modules/.bin/uglifycss lib/katex/katex-modified.min.css > build/guppy-none.min.css;./node_modules/.bin/uglifycss lib/katex/katex-modified.min.css style/osk.css > build/guppy-none-osk.min.css;./node_modules/.bin/uglifycss lib/katex/katex-modified.min.css style/guppy.css > build/guppy-default.min.css;./node_modules/.bin/uglifycss lib/katex/katex-modified.min.css style/guppy.css style/osk.css > build/guppy-default-osk.min.css", 16 | "lint": "./node_modules/.bin/eslint -c .eslintrc.json src/**", 17 | "generate-docs": "./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose && (cd site; ./build.sh)", 18 | "server": "./node_modules/.bin/http-server -p 8066 -a 127.0.0.1 -c -1 .", 19 | "deploy": "npm run-script build; cp deploy.json build/package.json; cd build; npm publish" 20 | }, 21 | "repository": "git+https://github.com/daniel3735928559/guppy.git", 22 | "keywords": [ 23 | "math", 24 | "wysiwyg", 25 | "equation", 26 | "editor" 27 | ], 28 | "author": "daniel3735928559", 29 | "license": "MIT", 30 | "bugs": { 31 | "url": "https://github.com/daniel3735928559/guppy/issues" 32 | }, 33 | "homepage": "https://github.com/daniel3735928559/guppy#readme", 34 | "devDependencies": { 35 | "babel-core": "^6.26.3", 36 | "babel-plugin-external-helpers": "^6.22.0", 37 | "babel-plugin-istanbul": "^5.1.0", 38 | "babel-preset-es2015": "^6.24.1", 39 | "browserify": "^14.5.0", 40 | "browserify-istanbul": "^3.0.1", 41 | "chromedriver": "^2.43.1", 42 | "docdash": "^0.4.0", 43 | "eslint": "^5.7.0", 44 | "express": "^4.16.2", 45 | "geckodriver": "^1.14.1", 46 | "http-server": "^0.11.1", 47 | "istanbul-middleware": "^0.2.2", 48 | "jasmine-core": "^3.3.0", 49 | "jsdoc": "^3.5.5", 50 | "karma": "^3.1.1", 51 | "karma-chrome-launcher": "^2.2.0", 52 | "karma-cli": "^1.0.1", 53 | "karma-coverage-istanbul-reporter": "^2.0.4", 54 | "karma-jasmine": "^1.1.2", 55 | "minimatch": "^3.0.4", 56 | "rollup": "^0.66.6", 57 | "rollup-plugin-babel": "^3.0.7", 58 | "rollup-plugin-commonjs": "^9.2.0", 59 | "rollup-plugin-eslint": "^5.0.0", 60 | "rollup-plugin-json": "^3.1.0", 61 | "rollup-plugin-uglify": "^6.0.0", 62 | "selenium-webdriver": "^3.6.0", 63 | "uglify-js": "^3.3.8", 64 | "uglifycss": "0.0.27" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import commonjs from 'rollup-plugin-commonjs'; 2 | import babel from 'rollup-plugin-babel'; 3 | import { uglify } from 'rollup-plugin-uglify'; 4 | import json from 'rollup-plugin-json'; 5 | 6 | export default { 7 | input: 'src/guppy.js', 8 | output: {name:'Guppy', 9 | file:process.env.NODE_ENV === 'production' ? 'build/guppy.min.js' :( process.env.NODE_ENV === 'test' ? 'build/guppy-test.js' : 'build/guppy.js'), 10 | format: 'iife'}, 11 | plugins: [ 12 | commonjs({ 13 | include: [ 14 | 'lib/mousetrap/**', 15 | 'lib/katex/**' 16 | ], 17 | namedExports: { 'mousetrap': ['Mousetrap'] } 18 | }), 19 | json({ 20 | include: ['sym/**'] 21 | }), 22 | babel({ 23 | exclude: 'node_modules/**', 24 | presets: [['es2015', { "modules": false }]], 25 | plugins: (process.env.NODE_ENV === 'test' ? [['istanbul', {"include": ['src/**']}]] : []) 26 | }), 27 | //(process.env.NODE_ENV === 'test' && istanbul({ 28 | // include: ['src/**'] 29 | //})), 30 | (process.env.NODE_ENV === 'production' && uglify()), 31 | ], 32 | }; 33 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-alpha.1/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-alpha.1/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-alpha.1/styles/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #ddd; 3 | } 4 | 5 | /* string content */ 6 | .str { 7 | color: #61ce3c; 8 | } 9 | 10 | /* a keyword */ 11 | .kwd { 12 | color: #fbde2d; 13 | } 14 | 15 | /* a comment */ 16 | .com { 17 | color: #aeaeae; 18 | } 19 | 20 | /* a type name */ 21 | .typ { 22 | color: #8da6ce; 23 | } 24 | 25 | /* a literal value */ 26 | .lit { 27 | color: #fbde2d; 28 | } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #ddd; 33 | } 34 | 35 | /* lisp open bracket */ 36 | .opn { 37 | color: #000000; 38 | } 39 | 40 | /* lisp close bracket */ 41 | .clo { 42 | color: #000000; 43 | } 44 | 45 | /* a markup tag name */ 46 | .tag { 47 | color: #8da6ce; 48 | } 49 | 50 | /* a markup attribute name */ 51 | .atn { 52 | color: #fbde2d; 53 | } 54 | 55 | /* a markup attribute value */ 56 | .atv { 57 | color: #ddd; 58 | } 59 | 60 | /* a declaration */ 61 | .dec { 62 | color: #EF5050; 63 | } 64 | 65 | /* a variable name */ 66 | .var { 67 | color: #c82829; 68 | } 69 | 70 | /* a function name */ 71 | .fun { 72 | color: #4271ae; 73 | } 74 | 75 | /* Specify class=linenums on a pre to get line numbering */ 76 | ol.linenums { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | } 80 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.1/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.1/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.1/styles/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #ddd; 3 | } 4 | 5 | /* string content */ 6 | .str { 7 | color: #61ce3c; 8 | } 9 | 10 | /* a keyword */ 11 | .kwd { 12 | color: #fbde2d; 13 | } 14 | 15 | /* a comment */ 16 | .com { 17 | color: #aeaeae; 18 | } 19 | 20 | /* a type name */ 21 | .typ { 22 | color: #8da6ce; 23 | } 24 | 25 | /* a literal value */ 26 | .lit { 27 | color: #fbde2d; 28 | } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #ddd; 33 | } 34 | 35 | /* lisp open bracket */ 36 | .opn { 37 | color: #000000; 38 | } 39 | 40 | /* lisp close bracket */ 41 | .clo { 42 | color: #000000; 43 | } 44 | 45 | /* a markup tag name */ 46 | .tag { 47 | color: #8da6ce; 48 | } 49 | 50 | /* a markup attribute name */ 51 | .atn { 52 | color: #fbde2d; 53 | } 54 | 55 | /* a markup attribute value */ 56 | .atv { 57 | color: #ddd; 58 | } 59 | 60 | /* a declaration */ 61 | .dec { 62 | color: #EF5050; 63 | } 64 | 65 | /* a variable name */ 66 | .var { 67 | color: #c82829; 68 | } 69 | 70 | /* a function name */ 71 | .fun { 72 | color: #4271ae; 73 | } 74 | 75 | /* Specify class=linenums on a pre to get line numbering */ 76 | ol.linenums { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | } 80 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.3/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.3/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-beta.3/styles/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #ddd; 3 | } 4 | 5 | /* string content */ 6 | .str { 7 | color: #61ce3c; 8 | } 9 | 10 | /* a keyword */ 11 | .kwd { 12 | color: #fbde2d; 13 | } 14 | 15 | /* a comment */ 16 | .com { 17 | color: #aeaeae; 18 | } 19 | 20 | /* a type name */ 21 | .typ { 22 | color: #8da6ce; 23 | } 24 | 25 | /* a literal value */ 26 | .lit { 27 | color: #fbde2d; 28 | } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #ddd; 33 | } 34 | 35 | /* lisp open bracket */ 36 | .opn { 37 | color: #000000; 38 | } 39 | 40 | /* lisp close bracket */ 41 | .clo { 42 | color: #000000; 43 | } 44 | 45 | /* a markup tag name */ 46 | .tag { 47 | color: #8da6ce; 48 | } 49 | 50 | /* a markup attribute name */ 51 | .atn { 52 | color: #fbde2d; 53 | } 54 | 55 | /* a markup attribute value */ 56 | .atv { 57 | color: #ddd; 58 | } 59 | 60 | /* a declaration */ 61 | .dec { 62 | color: #EF5050; 63 | } 64 | 65 | /* a variable name */ 66 | .var { 67 | color: #c82829; 68 | } 69 | 70 | /* a function name */ 71 | .fun { 72 | color: #4271ae; 73 | } 74 | 75 | /* Specify class=linenums on a pre to get line numbering */ 76 | ol.linenums { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | } 80 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-rc.1/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-rc.1/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /site/api/guppy-js/2.0.0-rc.1/styles/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #ddd; 3 | } 4 | 5 | /* string content */ 6 | .str { 7 | color: #61ce3c; 8 | } 9 | 10 | /* a keyword */ 11 | .kwd { 12 | color: #fbde2d; 13 | } 14 | 15 | /* a comment */ 16 | .com { 17 | color: #aeaeae; 18 | } 19 | 20 | /* a type name */ 21 | .typ { 22 | color: #8da6ce; 23 | } 24 | 25 | /* a literal value */ 26 | .lit { 27 | color: #fbde2d; 28 | } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #ddd; 33 | } 34 | 35 | /* lisp open bracket */ 36 | .opn { 37 | color: #000000; 38 | } 39 | 40 | /* lisp close bracket */ 41 | .clo { 42 | color: #000000; 43 | } 44 | 45 | /* a markup tag name */ 46 | .tag { 47 | color: #8da6ce; 48 | } 49 | 50 | /* a markup attribute name */ 51 | .atn { 52 | color: #fbde2d; 53 | } 54 | 55 | /* a markup attribute value */ 56 | .atv { 57 | color: #ddd; 58 | } 59 | 60 | /* a declaration */ 61 | .dec { 62 | color: #EF5050; 63 | } 64 | 65 | /* a variable name */ 66 | .var { 67 | color: #c82829; 68 | } 69 | 70 | /* a function name */ 71 | .fun { 72 | color: #4271ae; 73 | } 74 | 75 | /* Specify class=linenums on a pre to get line numbering */ 76 | ol.linenums { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | } 80 | -------------------------------------------------------------------------------- /site/build.sh: -------------------------------------------------------------------------------- 1 | pandoc --version || { echo "pandoc is required to build the site"; exit 1; } 2 | 3 | for x in `ls doc/_src/|grep md$`; do echo $x; pandoc --toc --toc-depth=4 --ascii -f markdown --template template.html doc/_src/$x > doc/$(echo $x | sed 's/md$/html/'); done 4 | pandoc --ascii -f markdown --template template.html doc/_src/index.md > doc/index.html 5 | pandoc --ascii -f html -V title:'Quick start' --template template.html doc/_src/quickstart.html > doc/quickstart.html 6 | pandoc --ascii -f html -V title:Examples --template template.html examples/_src/index.html > examples/index.html 7 | pandoc --ascii -f html -V title:Contribute --template template.html contribute/_src/index.html > contribute/index.html 8 | ( cd examples; 9 | for x in article basic calc events graph import io quiz; do 10 | echo $x; 11 | echo | pandoc -f markdown -V title="$x example" --template template.html -V name="$x" -V hash=$(cat "$x/codepen_hash") > "$x"/index.html; 12 | done; ) 13 | -------------------------------------------------------------------------------- /site/contribute/_src/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Develop

4 | 5 |

If you want to help with development, this page contains some 6 | resources to help set up your environment for running, 7 | testing, and understanding the code. I also try to be 8 | responsive to 9 | issues 10 | raised via github. Feel free to raise questions about 11 | development there (as well as issues with the code!)

12 |
13 |
14 |
15 |

Download

16 |
17 | 18 |
19 | To get started, run 20 | 21 |
$ git clone https://github.com/daniel3735928559/guppy
22 | $ cd guppy
23 | $ npm install --only=dev
24 |
25 |
26 |
27 |
28 |

Build

29 |
30 | To build, do 31 |
$ npm run-script build-debug
32 |
33 |
34 |
35 |

Test

36 | 37 |
38 | To run the tests and code coverage tools, 39 | do 40 |
$ npm test
41 | The results of the tests will be displayed on the command line. 42 |
43 |
44 |
45 |
46 | 47 |

Report

48 |
49 | To see current outstanding issues or to report new ones, use 50 | the issue tracker on github.
51 |
52 |
53 |
54 | 55 |

Plan

56 | 57 |
For future development plans and direction, check 58 | the roadmap. 59 |
60 |
61 |
62 |
63 | 64 |

Learn

65 | 66 |
67 | For an introduction to the editor's internal algorithms, 68 | see here, 69 | and 70 | also here 71 | for a description of the XML format used internally by the 72 | editor.
73 |
74 |
75 |

Donate

76 | 77 |

This project is undertaken entirely in my free time. If you 78 | would like to support it with a small donation, you can do so 79 | here:

80 | 81 | 85 | 86 |
87 |
88 | -------------------------------------------------------------------------------- /site/contribute/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Contribute 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Contribute

36 |
37 |
38 | 39 |

Develop

40 |

If you want to help with development, this page contains some resources to help set up your environment for running, testing, and understanding the code. I also try to be responsive to issues raised via github. Feel free to raise questions about development there (as well as issues with the code!)

41 |
42 |
43 |
44 |

Download

45 |
46 |
47 | To get started, run 48 |
$ git clone https://github.com/daniel3735928559/guppy
 49 | $ cd guppy
 50 | $ npm install --only=dev
51 |
52 |
53 |
54 |
55 |

Build

56 |
57 |
58 | To build, do 59 |
$ npm run-script build-debug
60 |
61 |
62 |
63 |
64 |

Test

65 |
66 |
67 | To run the tests and code coverage tools, do 68 |
$ npm test
69 | The results of the tests will be displayed on the command line. 70 |
71 |
72 |
73 |
74 |

Report

75 |
76 |
77 | To see current outstanding issues or to report new ones, use the issue tracker on github. 78 |
79 |
80 |
81 |
82 |

Plan

83 |
84 |
85 | For future development plans and direction, check the roadmap. 86 |
87 |
88 |
89 |
90 |

Learn

91 |
92 |
93 | For an introduction to the editor's internal algorithms, see here, and also here for a description of the XML format used internally by the editor. 94 |
95 |
96 |
97 | 98 |

Donate

99 |

This project is undertaken entirely in my free time. If you would like to support it with a small donation, you can do so here:

100 | 103 |
104 |
105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /site/doc/_src/format.md: -------------------------------------------------------------------------------- 1 | % XML data format 2 | 3 | ### Specification 4 | 5 | The XML format by which mathematical expressions are internally 6 | represented is specified as follows: 7 | 8 | * The document is `[component]` 9 | 10 | * The `v` attribute contains the Guppy document version in use. See 11 | [version information](./version.html). 12 | 13 | * A `[component]` consists of alternating `` and `` nodes, always 14 | starting and ending with `` nodes. 15 | 16 | * `` nodes represent expressions and contain only text, as in 17 | `x+1` 18 | 19 | * `` nodes represent symbols and have one attribute: `type`, whose 20 | value comes from the `type` field in `symbols.json`. They look like 21 | ``` 22 | [sequence of b nodes][sequence of c or l nodes] 23 | ``` 24 | 25 | * `` nodes represent methods for rendering a symbol, specified in 26 | the `p` attribute. They contain text interspersed with `` nodes 27 | which determine where the editable components of the symbol go. For 28 | example, a square root symbol will specify how to render itself in 29 | LaTeX by having in its b nodes: `\sqrt{}`, 30 | indicating that it should be rendered as `\sqrt{first component goes here}`. 31 | 32 | * `` nodes are references to components inside `` nodes, and 33 | have only a `ref` attribute, whose value is the index of the 34 | component that should be rendered in place of that `` node. 35 | 36 | * `` nodes are the editable components of a symbol, appearing under 37 | an `` node after the `` nodes, and in order of index (as 38 | referenced in the `` nodes). They can also appear as children of 39 | `` nodes, representing the elements of the array. They have 40 | whatever attributes are specified in the `attrs` key for this symbol 41 | in `symbols.json`, and they look like `[component]`, 42 | where a `[component]` is as defined above. 43 | 44 | * `` nodes are arrays, and may appear as children of `` nodes or 45 | of other `` nodes (in the case of a multi-dimensional array). An 46 | `` node always has an `s` attribute indicating how many immediate 47 | children it has (e.g., in the case of a 1D array, how many elements 48 | the array has, represented by the number of `` nodes). 49 | 50 | ### Example: `x+1` 51 | 52 | The simple expression `x+1` is represented as: 53 | 54 | ``` 55 | 56 | x+1 57 | 58 | ``` 59 | 60 | ### Example: `sin(x)` 61 | 62 | `sin(x)` is represented as: 63 | 64 | ``` 65 | 66 | 67 | 68 | \sin\left(\right) 69 | sin() 70 | x 71 | 72 | 73 | 74 | ``` 75 | 76 | ### Example: `sqrt(x+1)` 77 | 78 | The square root of `x+1` is: 79 | 80 | ``` 81 | 82 | 83 | 84 | \sqrt{} 85 | sqrt() 86 | x+1 87 | 88 | 89 | 90 | ``` 91 | 92 | ### Example: `1+(1-x)/sin(x)` 93 | 94 | `1+(1-x)/sin(x)` would be represented as: 95 | 96 | ``` 97 | 98 | 1+ 99 | 100 | \dfrac{}{} 101 | \frac{}{} 102 | ()/() 103 | 1-x 104 | 105 | 106 | 107 | \sin\left(\right) 108 | sin() 109 | x 110 | 111 | 112 | 113 | 114 | 115 | 116 | ``` 117 | 118 | ### Example: Matrix 119 | 120 | The 2x3 matrix `[1, 2, 3; x, y, z]` would be represented by: 121 | 122 | 123 | ``` 124 | 125 | 126 | 127 | \left(\begin{matrix} \end{matrix}\right) 128 | matrix() 129 | 130 | 131 | 1 132 | 2 133 | 3 134 | 135 | 136 | x 137 | y 138 | z 139 | 140 | 141 | 142 | 143 | 144 | ``` 145 | -------------------------------------------------------------------------------- /site/doc/_src/index.md: -------------------------------------------------------------------------------- 1 | % Documentation 2 | 3 | ### Usage 4 | 5 | * [Quickstart](quickstart.html): 6 | Quickly get started using the editor 7 | 8 | * [Styling the editor](style.html): 9 | How to style the editor with CSS 10 | 11 | * [Scripting the editor](script.html): 12 | How to control the editor from Javascript 13 | 14 | * [Rendering documents statically](render.html): 15 | Use Guppy to render documents on a page 16 | 17 | * [Creating a new symbol](symbols.html): 18 | How to add a symbol to the editor 19 | 20 | * [Document/symbol spec changelog](version.html): 21 | Version changelogs for document and symbol formats 22 | 23 | * [Frequently asked questions](faq.html): 24 | Other questions 25 | 26 | ### API 27 | 28 | * [Guppy](../api/guppy-js/2.0.0-rc.1/Guppy.html): 29 | The API for working with the editor object 30 | 31 | * [Doc](../api/guppy-js/2.0.0-rc.1/Doc.html) 32 | The API for working with documents generated by the editor 33 | 34 | * [Engine](../api/guppy-js/2.0.0-rc.1/Engine.html) 35 | The API for controlling the editor programatically 36 | 37 | * [GuppyOSK](../api/guppy-js/2.0.0-rc.1/GuppyOSK.html) 38 | The API for the built-in on-screen keyboard (e.g. for mobile input) 39 | 40 | ### Internals 41 | 42 | * [XML Format](format.html): 43 | The editor's XML storage format 44 | 45 | * [Editor internals](internals.html): 46 | The editor's inner workings 47 | 48 | * [Roadmap](roadmap.html): 49 | The roadmap for future development 50 | -------------------------------------------------------------------------------- /site/doc/_src/quickstart.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
    4 |
  • Install guppy with
    npm install guppy-js
  • 5 |
  • Include guppy.min.js and guppy-default.min.css in your page: 6 |
    <link rel="stylesheet" href="/node_modules/guppy-js/style/guppy-default.min.css">
     7 | <script type="text/javascript" src="/node_modules/guppy-js/guppy.min.js"></script>
  • 8 |
  • Initialise an instance of the editor with the ID of a 9 | div that you want to be turned into the editor. 10 |
    var g1 = new Guppy("guppy1");
  • 11 |
  • Optionally, configure editors to taste: 12 |
    • Use Guppy.configure to adjust settings for all Guppy instances
    • 13 |
    • Use g1.configure to adjust settings just for this one instance.
    • 14 |
    • Use Guppy.event set an event handler for events on all editors.
    • 15 |
    • Use g1.event to set an event handler for this specific instance.
    • 16 |
    17 |
  • 18 |
  • Putting it all together for a complete basic example: 19 |
    <!doctype html>
    20 | <html>
    21 | <head>
    22 |     <link rel="stylesheet" href="/node_modules/guppy-js/style/guppy-default.min.css">
    23 |     <script type="text/javascript" src="/node_modules/guppy-js/guppy.min.js"></script>
    24 |     <script type="text/javascript">
    25 |         window.onload = function(){
    26 |             var g1 = new Guppy("guppy1");
    27 |         }
    28 |     </script>
    29 | </head>
    30 | 
    31 | <body>
    32 |     <div id="guppy1" style="width:400px;"></div>
    33 | </body>
    34 | 
    35 | </html>
  • 36 |
37 | 38 |
39 |
40 | -------------------------------------------------------------------------------- /site/doc/_src/render.md: -------------------------------------------------------------------------------- 1 | % Rendering documents 2 | 3 | Guppy has the ability to render pre-existing mathematical expression 4 | on a page, where those expressions may be specified as XML documents, 5 | JSON syntax trees, plain text, or semantic LaTeX. 6 | 7 | In all cases, equations get rendered into a `` element with a 8 | unique ID and class `guppy-render`. To render many Guppy documents on 9 | a page, you call `render_all` (parameters described below), which will 10 | return a list of objects of the form `{"id":id, "doc":doc}`, where 11 | `id` is the string ID of the span containing the rendered document, 12 | and `doc` is the Guppy.Doc object there rendered. 13 | 14 | 15 | ### Rendering pre-existing XML 16 | 17 | If you have a GuppyXML document, say `x+1`, 18 | then you can include it in an HTML document as valid HTML by enclosing 19 | it in a script tag: 20 | 21 | ``` 22 | 25 | ``` 26 | 27 | On such a page, a call to `Guppy.Doc.render_all()` will render 28 | all such tags as documents, and will return the list of 29 | `{"id":id, "doc":doc}` objects as described above. 30 | 31 | ### Rendering plain text or LaTeX 32 | 33 | If you have equations on a page in a format that Guppy can 34 | import--plain text or semantic LaTeX, and those equations are 35 | delimited by some string such as `"$$"`, `Guppy.Doc.render_all` can also 36 | render these. The first arguemnt is the format in which the equations 37 | are specified (`"latex"` or `"text"`) and the second is the delimited 38 | string (e.g. `"$$"`). 39 | 40 | ``` 41 |

This is a paragraph about $$m^(a^(t^h))$$

42 | ``` 43 | 44 | Can be rendered with `Guppy.Doc.render_all("text", "$$")`. 45 | 46 | ### Accessing rendered document objects 47 | 48 | The function `render_all` returns a list of objects that specify both 49 | the id of the span into which the expression was rendered and the 50 | Guppy.Doc object that contains the information. So, for example, if 51 | you had rendered `x^2` on the page and wanted to evaluate it in 52 | response to user input, you could do: 53 | 54 | ``` 55 | var eqns = Guppy.Doc.render_all("text", "$$") 56 | var x = prompt("Enter a value for x"); 57 | alert(eqns[0].get_content("function")({"x":x})); 58 | ``` 59 | -------------------------------------------------------------------------------- /site/doc/_src/roadmap.md: -------------------------------------------------------------------------------- 1 | % Roadmap 2 | 3 | The high-level goals of this project are that mathematics should be 4 | stored in a way that is easy for both computers and humans to 5 | consume. Our plan has three parts: 6 | 7 | * Enhance its **compatibility**, ensuring it can be used on many 8 | platforms. 9 | 10 | * Explore **integration** with existing platforms for creating 11 | mathematical content. 12 | 13 | * Develop **applications** that allow those consuming mathematical 14 | content to take advantage of the computer's improved understanding 15 | of that content. 16 | 17 | ### Compatibility 18 | 19 | We wish to ensure that the editor is usable on as many platforms as 20 | possible: 21 | 22 | * More mobile testing 23 | 24 | * Internet Explorer compatibility (possibly through babelify?) 25 | 26 | ### Integration 27 | 28 | We seek to allow people to use the editor in contexts in which they 29 | already create mathematical content. Some (by no means all) platforms 30 | that I wish to explore specifically are: 31 | 32 | * Programming tools: Jupyter notebooks, Sage workbooks 33 | 34 | * Javascript libraries/frameworks: Quill.js, ReactJS, CodeMirror 35 | 36 | * Content management systems: TiddlyWiki, Moodle, WordPress, Emacs 37 | 38 | ### Applications 39 | 40 | When mathematical content is stored in a computer-friendly way, there 41 | should be ways of leveraging that extra understanding to help those 42 | consuming that content. 43 | 44 | We envision a tool a bit like a programming IDE, except for reading 45 | mathematics. For example, if when reading a theorem we find a symbol 46 | whose definition we have forgotten, we should be able to click on that 47 | symbol and be able to cross-reference its definition and its other 48 | instances in the document. 49 | 50 | ### Philosophy 51 | 52 | If PostScript is the assembly language of typesetting mathematics, 53 | then perhaps LaTeX is the C and this XML format can be one of many 54 | competing higher-level languages for specifying mathematical 55 | formulae--not optimal for all use-cases, but addressing positively the 56 | needs of a few. 57 | -------------------------------------------------------------------------------- /site/doc/_src/script.md: -------------------------------------------------------------------------------- 1 | % Scripting the editor 2 | 3 | Any Guppy instance can be controlled from javascript. For example, 4 | you can create some buttons that perform actions in the editor (such 5 | as moving the cursor right and left or inserting an integral symbol). 6 | 7 | The object that allows most of this is the `Engine` instance 8 | associated with an editor. If we have an editor with ID "guppy1", we 9 | can access its `Engine` with `Guppy("guppy1").engine`. Functions 10 | available from this object are documented in the API 11 | [here](../api/guppy-js/2.0.0-rc.1/Engine.html). 12 | 13 | For example, to move the cursor one space to the left, insert the 14 | letter "x", and then delete what comes after it, we can do: 15 | 16 | ``` 17 | var e = Guppy("guppy1").engine; 18 | e.left(); 19 | e.insert_string("x"); 20 | e.delete_key(); 21 | ``` 22 | -------------------------------------------------------------------------------- /site/doc/_src/style.md: -------------------------------------------------------------------------------- 1 | % CSS styling 2 | 3 | The following CSS selectors will provide access to various elements of the editor: 4 | 5 | * `.guppy_active`: The guppy div when it is active. For example, one 6 | can use the `border` property of this class to cause the editor to 7 | have a glowing blue border when active. 8 | 9 | * `.guppy_inactive`: The guppy div when it is inactive. For example, 10 | set the `background-color` of this class to a shade of grey to grey 11 | out the editor when inactive. 12 | 13 | * `.guppy_active .main_cursor`: The span for the main cursor. CSS 14 | animations can be used, for example, to make the cursor blink. 15 | 16 | * `.guppy_text_current`: The span for any plain text content currently 17 | under selection. For example, to highlight a textbox with a grey 18 | border while selected, set a `border` style for this CSS class. 19 | 20 | * `.guppy_buttons img`: The image elements for the configuration/help 21 | buttons in the editor. 22 | 23 | * `.guppy_buttons`: The container for the configuration/help buttons 24 | in the editor. 25 | 26 | For example, we present here the stylesheet for the example Guppy 27 | page: 28 | 29 | ``` 30 | .guppy_active { 31 | border: 2px solid black; 32 | padding: 10px; 33 | box-shadow: 1px 1px 1px 0 lightgray inset; 34 | cursor: text; 35 | background-color: #ffffff; 36 | color:#000; 37 | position:relative; 38 | } 39 | 40 | .guppy_inactive { 41 | border: 2px solid black; 42 | padding: 10px; 43 | box-shadow: 1px 1px 1px 0 lightgray inset; 44 | cursor: text; 45 | background-color: #fafafa; 46 | color:#000; 47 | position:relative; 48 | } 49 | 50 | .guppy_text_current { 51 | border: 1px solid #ccc; 52 | } 53 | 54 | .guppy_active .main_cursor { 55 | animation: blink-animation 1s steps(2, start) infinite; 56 | -webkit-animation: blink-animation 1s steps(2, start) infinite; 57 | } 58 | 59 | .guppy_active .guppy_buttons { 60 | display: block; 61 | } 62 | 63 | .guppy_inactive .guppy_buttons { 64 | display: none; 65 | } 66 | 67 | .guppy_buttons { 68 | position:absolute; 69 | bottom:0; 70 | right:0; 71 | padding:0 3px 3px 0; 72 | } 73 | 74 | .guppy_buttons img{ 75 | cursor:pointer; 76 | height:16px; 77 | width:16px; 78 | padding:3px; 79 | opacity: 0.5; 80 | } 81 | 82 | .guppy_buttons img:hover{ 83 | opacity: 1; 84 | } 85 | 86 | @keyframes blink-animation { 87 | to { visibility: hidden; } 88 | } 89 | 90 | @-webkit-keyframes blink-animation { 91 | to { visibility: hidden; } 92 | } 93 | ``` 94 | 95 | -------------------------------------------------------------------------------- /site/doc/_src/version.md: -------------------------------------------------------------------------------- 1 | % Format version changelogs 2 | 3 | Here we describe the various versions of Guppy XML documents and 4 | symbol specifications that may exist in the wild with the following 5 | caveats: 6 | 7 | * Any symbol file not containing a `_version` top-level key may be 8 | assumed to be version 1.0.0. 9 | 10 | * Any Guppy XML document not containing `m/@v` may be assumed to be 11 | 1.1.0. 12 | 13 | * Document and symbol version numbers need not correlate with version 14 | numbers of Guppy itself. 15 | 16 | ### Symbol 17 | 18 | The complete specification for the current version is described in the 19 | documentation for 20 | [`Guppy.add_global_symbol`](../api/guppy-js/2.0.0-rc.1/Guppy.html#.add_global_symbol). 21 | 22 | #### 2.0.0-alpha.3 23 | 24 | * Added `keys` to symbol dictionary to specify keyboard input 25 | combinations for that symbol. 26 | 27 | #### 2.0.0-alpha.2 28 | 29 | * Removed `attrs.char` as redundant 30 | 31 | * Replaced `current.index` with `input` 32 | 33 | #### 2.0.0-alpha.1 34 | 35 | * Added top-level keys `_version`, `_name`, and `_templates`. 36 | 37 | * Moved `attrs` to `args` 38 | 39 | * Moved `char`, `type`, and `group` to subkeys of `attrs` 40 | 41 | * Added `template` 42 | 43 | * Added `ast.type` and `ast.value` 44 | 45 | * Transposed `attrs` (now `args`) from 46 | ``` 47 | { 48 | attr1: [arg1attr1val, arg2attr1val], 49 | attr2: [arg1attr2val, arg2attr2val] 50 | } 51 | ``` 52 | to 53 | ``` 54 | [ 55 | arg1: {attr1:val,attr2:val}, 56 | arg2: {attr1:val,attr2:val} 57 | ] 58 | ``` 59 | since the attributes used by different arguments are frequently 60 | different. Breaks compatibility with 1.0.0. 61 | 62 | #### 1.0.0 63 | 64 | Initial version 65 | 66 | ### Document 67 | 68 | The complete specification for the current version is described in the 69 | [XML format](./format.html) page. 70 | 71 | #### 1.2.0 72 | 73 | * Added `m/@v` to specify version. 74 | 75 | * Removed `f/@c` 76 | 77 | * Backwards-compatible with 1.1.0 and 1.0.0 78 | 79 | #### 1.1.0 80 | 81 | * Added `l` nodes as valid children of `f` and `l` nodes, with valid 82 | children either `l` or `c`. 83 | 84 | * Backwards-compatible with 1.0.0 85 | 86 | #### 1.0.0 87 | 88 | Initial version 89 | -------------------------------------------------------------------------------- /site/doc/guides.json: -------------------------------------------------------------------------------- 1 | { 2 | "usage": {"title": "Using the editor", 3 | "children":{ 4 | "style": {"title":"Styling the editor"}, 5 | "symbols":{"title":"Creating custom symbols"}}}, 6 | "behind-the-scenes":{"title": "Behind the scenes", 7 | "children":{ 8 | "roadmap": {"title": "Roadmap for future development"}, 9 | "format": {"title": "XML format"}, 10 | "internals": {"title": "Editor internals"}}} 11 | } 12 | -------------------------------------------------------------------------------- /site/doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Documentation

36 |

Usage

37 | 46 |

API

47 |
    48 |
  • Guppy: The API for working with the editor object

  • 49 |
  • Doc The API for working with documents generated by the editor

  • 50 |
  • Engine The API for controlling the editor programatically

  • 51 |
  • GuppyOSK The API for the built-in on-screen keyboard (e.g. for mobile input)

  • 52 |
53 |

Internals

54 | 59 |
60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /site/doc/quickstart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Quick start 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Quick start

36 |
37 |
38 |
    39 |
  • Install guppy with

    40 |
    npm install guppy-js
  • 41 |
  • Include guppy.min.js and guppy-default.min.css in your page:

    42 |
    <link rel="stylesheet" href="/node_modules/guppy-js/style/guppy-default.min.css">
    43 | <script type="text/javascript" src="/node_modules/guppy-js/guppy.min.js"></script>
  • 44 |
  • Initialise an instance of the editor with the ID of a div that you want to be turned into the editor.

    45 |
    var g1 = new Guppy("guppy1");
  • 46 |
  • Optionally, configure editors to taste: 47 |
      48 |
    • Use Guppy.configure to adjust settings for all Guppy instances
    • 49 |
    • Use g1.configure to adjust settings just for this one instance.
    • 50 |
    • Use Guppy.event set an event handler for events on all editors.
    • 51 |
    • Use g1.event to set an event handler for this specific instance.
    • 52 |
  • 53 |
  • Putting it all together for a complete basic example:

    54 |
    <!doctype html>
    55 | <html>
    56 | <head>
    57 |     <link rel="stylesheet" href="/node_modules/guppy-js/style/guppy-default.min.css">
    58 |     <script type="text/javascript" src="/node_modules/guppy-js/guppy.min.js"></script>
    59 |     <script type="text/javascript">
    60 |         window.onload = function(){
    61 |             var g1 = new Guppy("guppy1");
    62 |         }
    63 |     </script>
    64 | </head>
    65 | 
    66 | <body>
    67 |     <div id="guppy1" style="width:400px;"></div>
    68 | </body>
    69 | 
    70 | </html>
  • 71 |
72 |
73 |
74 |
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /site/doc/render.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Rendering documents 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Rendering documents

36 | 41 |

Guppy has the ability to render pre-existing mathematical expression on a page, where those expressions may be specified as XML documents, JSON syntax trees, plain text, or semantic LaTeX.

42 |

In all cases, equations get rendered into a <span> element with a unique ID and class guppy-render. To render many Guppy documents on a page, you call render_all (parameters described below), which will return a list of objects of the form {"id":id, "doc":doc}, where id is the string ID of the span containing the rendered document, and doc is the Guppy.Doc object there rendered.

43 |

Rendering pre-existing XML

44 |

If you have a GuppyXML document, say <m v="2.0.0"><e>x+1</e></m>, then you can include it in an HTML document as valid HTML by enclosing it in a script tag:

45 |
<script type="text/guppy_xml">
46 |   <m v="2.0.0"><e>x+1</e></m>
47 | </script>
48 |

On such a page, a call to Guppy.Doc.render_all() will render all such tags as documents, and will return the list of {"id":id, "doc":doc} objects as described above.

49 |

Rendering plain text or LaTeX

50 |

If you have equations on a page in a format that Guppy can import–plain text or semantic LaTeX, and those equations are delimited by some string such as "$$", Guppy.Doc.render_all can also render these. The first arguemnt is the format in which the equations are specified ("latex" or "text") and the second is the delimited string (e.g. "$$").

51 |
<p>This is a paragraph about $$m^(a^(t^h))$$</p>
52 |

Can be rendered with Guppy.Doc.render_all("text", "$$").

53 |

Accessing rendered document objects

54 |

The function render_all returns a list of objects that specify both the id of the span into which the expression was rendered and the Guppy.Doc object that contains the information. So, for example, if you had rendered x^2 on the page and wanted to evaluate it in response to user input, you could do:

55 |
var eqns = Guppy.Doc.render_all("text", "$$")
56 | var x = prompt("Enter a value for x");
57 | alert(eqns[0].get_content("function")({"x":x}));
58 |
59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /site/doc/roadmap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Roadmap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Roadmap

36 | 42 |

The high-level goals of this project are that mathematics should be stored in a way that is easy for both computers and humans to consume. Our plan has three parts:

43 |
    44 |
  • Enhance its compatibility, ensuring it can be used on many platforms.

  • 45 |
  • Explore integration with existing platforms for creating mathematical content.

  • 46 |
  • Develop applications that allow those consuming mathematical content to take advantage of the computer’s improved understanding of that content.

  • 47 |
48 |

Compatibility

49 |

We wish to ensure that the editor is usable on as many platforms as possible:

50 |
    51 |
  • More mobile testing

  • 52 |
  • Internet Explorer compatibility (possibly through babelify?)

  • 53 |
54 |

Integration

55 |

We seek to allow people to use the editor in contexts in which they already create mathematical content. Some (by no means all) platforms that I wish to explore specifically are:

56 |
    57 |
  • Programming tools: Jupyter notebooks, Sage workbooks

  • 58 |
  • Javascript libraries/frameworks: Quill.js, ReactJS, CodeMirror

  • 59 |
  • Content management systems: TiddlyWiki, Moodle, WordPress, Emacs

  • 60 |
61 |

Applications

62 |

When mathematical content is stored in a computer-friendly way, there should be ways of leveraging that extra understanding to help those consuming that content.

63 |

We envision a tool a bit like a programming IDE, except for reading mathematics. For example, if when reading a theorem we find a symbol whose definition we have forgotten, we should be able to click on that symbol and be able to cross-reference its definition and its other instances in the document.

64 |

Philosophy

65 |

If PostScript is the assembly language of typesetting mathematics, then perhaps LaTeX is the C and this XML format can be one of many competing higher-level languages for specifying mathematical formulae–not optimal for all use-cases, but addressing positively the needs of a few.

66 |
67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /site/doc/script.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Scripting the editor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Scripting the editor

36 |

Any Guppy instance can be controlled from javascript. For example, you can create some buttons that perform actions in the editor (such as moving the cursor right and left or inserting an integral symbol).

37 |

The object that allows most of this is the Engine instance associated with an editor. If we have an editor with ID “guppy1”, we can access its Engine with Guppy("guppy1").engine. Functions available from this object are documented in the API here.

38 |

For example, to move the cursor one space to the left, insert the letter “x”, and then delete what comes after it, we can do:

39 |
var e = Guppy("guppy1").engine;
40 | e.left();
41 | e.insert_string("x");
42 | e.delete_key();
43 |
44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /site/doc/style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: CSS styling 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

CSS styling

36 |

The following CSS selectors will provide access to various elements of the editor:

37 |
    38 |
  • .guppy_active: The guppy div when it is active. For example, one can use the border property of this class to cause the editor to have a glowing blue border when active.

  • 39 |
  • .guppy_inactive: The guppy div when it is inactive. For example, set the background-color of this class to a shade of grey to grey out the editor when inactive.

  • 40 |
  • .guppy_active .main_cursor: The span for the main cursor. CSS animations can be used, for example, to make the cursor blink.

  • 41 |
  • .guppy_text_current: The span for any plain text content currently under selection. For example, to highlight a textbox with a grey border while selected, set a border style for this CSS class.

  • 42 |
  • .guppy_buttons img: The image elements for the configuration/help buttons in the editor.

  • 43 |
  • .guppy_buttons: The container for the configuration/help buttons in the editor.

  • 44 |
45 |

For example, we present here the stylesheet for the example Guppy page:

46 |
.guppy_active {
 47 |     border: 2px solid black;
 48 |     padding: 10px;
 49 |     box-shadow: 1px 1px 1px 0 lightgray inset;
 50 |     cursor: text;
 51 |     background-color: #ffffff;
 52 |     color:#000;
 53 |     position:relative;
 54 | }
 55 | 
 56 | .guppy_inactive {
 57 |     border: 2px solid black;
 58 |     padding: 10px;
 59 |     box-shadow: 1px 1px 1px 0 lightgray inset;
 60 |     cursor: text;
 61 |     background-color: #fafafa;
 62 |     color:#000;
 63 |     position:relative;
 64 | }
 65 | 
 66 | .guppy_text_current {
 67 |     border: 1px solid #ccc;
 68 | }
 69 | 
 70 | .guppy_active .main_cursor {
 71 |   animation: blink-animation 1s steps(2, start) infinite;
 72 |   -webkit-animation: blink-animation 1s steps(2, start) infinite;
 73 | }
 74 | 
 75 | .guppy_active .guppy_buttons {
 76 |     display: block;
 77 | }
 78 | 
 79 | .guppy_inactive .guppy_buttons {
 80 |     display: none;
 81 | }
 82 | 
 83 | .guppy_buttons {
 84 |     position:absolute;
 85 |     bottom:0;
 86 |     right:0;
 87 |     padding:0 3px 3px 0;
 88 | }
 89 | 
 90 | .guppy_buttons img{
 91 |     cursor:pointer;
 92 |     height:16px;
 93 |     width:16px;
 94 |     padding:3px;
 95 |     opacity: 0.5;
 96 | }
 97 | 
 98 | .guppy_buttons img:hover{
 99 |     opacity: 1;
100 | }
101 | 
102 | @keyframes blink-animation {
103 |   to { visibility: hidden; }
104 | }
105 | 
106 | @-webkit-keyframes blink-animation {
107 |   to { visibility: hidden; }
108 | }
109 |
110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /site/doc/version.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Format version changelogs 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Format version changelogs

36 | 49 |

Here we describe the various versions of Guppy XML documents and symbol specifications that may exist in the wild with the following caveats:

50 |
    51 |
  • Any symbol file not containing a _version top-level key may be assumed to be version 1.0.0.

  • 52 |
  • Any Guppy XML document not containing m/@v may be assumed to be 1.1.0.

  • 53 |
  • Document and symbol version numbers need not correlate with version numbers of Guppy itself.

  • 54 |
55 |

Symbol

56 |

The complete specification for the current version is described in the documentation for Guppy.add_global_symbol.

57 |

2.0.0-alpha.3

58 |
    59 |
  • Added keys to symbol dictionary to specify keyboard input combinations for that symbol.
  • 60 |
61 |

2.0.0-alpha.2

62 |
    63 |
  • Removed attrs.char as redundant

  • 64 |
  • Replaced current.index with input

  • 65 |
66 |

2.0.0-alpha.1

67 |
    68 |
  • Added top-level keys _version, _name, and _templates.

  • 69 |
  • Moved attrs to args

  • 70 |
  • Moved char, type, and group to subkeys of attrs

  • 71 |
  • Added template

  • 72 |
  • Added ast.type and ast.value

  • 73 |
  • Transposed attrs (now args) from

    74 |
    {
     75 |   attr1: [arg1attr1val, arg2attr1val],
     76 |   attr2: [arg1attr2val, arg2attr2val]
     77 | }
    78 |

    to

    79 |
    [
     80 |   arg1: {attr1:val,attr2:val},
     81 |   arg2: {attr1:val,attr2:val}
     82 | ]
    83 |

    since the attributes used by different arguments are frequently different. Breaks compatibility with 1.0.0.

  • 84 |
85 |

1.0.0

86 |

Initial version

87 |

Document

88 |

The complete specification for the current version is described in the XML format page.

89 |

1.2.0

90 |
    91 |
  • Added m/@v to specify version.

  • 92 |
  • Removed f/@c

  • 93 |
  • Backwards-compatible with 1.1.0 and 1.0.0

  • 94 |
95 |

1.1.0

96 |
    97 |
  • Added l nodes as valid children of f and l nodes, with valid children either l or c.

  • 98 |
  • Backwards-compatible with 1.0.0

  • 99 |
100 |

1.0.0

101 |

Initial version

102 |
103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /site/examples/_src/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
    4 |
  • Basic

    5 | A basic example of using the editor on a web page. 6 |
  • 7 |
  • Calc

    8 | Evaluate expressions numerically. 9 |
  • 10 |
  • Events

    11 | Trace all editor events. 12 |
  • 13 |
  • Mobile keyboard

    14 | Using the on-screen keyboard for mobile compatibility. 15 |
  • 16 |
  • Graphing

    17 | Extremely basic graphing calculator. 18 |
  • 19 |
  • Input/Output

    20 | Import and export editor expressions to/from all available formats. 21 |
  • 22 |
  • Quiz

    23 | Checking inputs against correct answers using math-expressions. 24 |
  • 25 |
  • Import

    26 | Importing plain text input into the editor using math-expressions. 27 |
  • 28 |
  • Article

    29 | A mathematical document with expressions rendered. 30 |
  • 31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /site/examples/article/article.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 |

You can use Guppy to render equations like $$x^2$$ and $$defintegral(0,infinity(),sin(x^2),x)$$.

16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /site/examples/article/codepen_hash: -------------------------------------------------------------------------------- 1 | QJrKbQ 2 | -------------------------------------------------------------------------------- /site/examples/article/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: article example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy article example

27 | (See plain example)
28 |

29 | See Guppy article example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/basic/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /site/examples/basic/codepen_hash: -------------------------------------------------------------------------------- 1 | GwxBPj 2 | -------------------------------------------------------------------------------- /site/examples/basic/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: basic example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy basic example

27 | (See plain example)
28 |

29 | See Guppy basic example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/calc/calc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Enter an expression (with no variables) to compute its value:

9 | 10 | 24 |
25 | = 26 | NaN 27 | 28 | 29 | -------------------------------------------------------------------------------- /site/examples/calc/codepen_hash: -------------------------------------------------------------------------------- 1 | RqMBva 2 | -------------------------------------------------------------------------------- /site/examples/calc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: calc example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy calc example

27 | (See plain example)
28 |

29 | See Guppy calc example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/events/codepen_hash: -------------------------------------------------------------------------------- 1 | KroBER 2 | -------------------------------------------------------------------------------- /site/examples/events/events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /site/examples/events/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: events example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy events example

27 | (See plain example)
28 |

29 | See Guppy events example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/graph/codepen_hash: -------------------------------------------------------------------------------- 1 | XyqjbG 2 | -------------------------------------------------------------------------------- /site/examples/graph/graph.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /site/examples/graph/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: graph example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy graph example

27 | (See plain example)
28 |

29 | See Guppy graph example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/import/codepen_hash: -------------------------------------------------------------------------------- 1 | RqyGaG 2 | -------------------------------------------------------------------------------- /site/examples/import/import.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Import 6 | 7 | 8 | 9 | 10 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |


41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /site/examples/import/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: import example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy import example

27 | (See plain example)
28 |

29 | See Guppy import example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: Examples 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 35 |

Examples

36 |
37 |
38 |
    39 |
  • Basic

    40 |

    A basic example of using the editor on a web page.

  • 41 |
  • Calc

    42 |

    Evaluate expressions numerically.

  • 43 |
  • Events

    44 |

    Trace all editor events.

  • 45 |
  • Mobile keyboard

    46 |

    Using the on-screen keyboard for mobile compatibility.

  • 47 |
  • Graphing

    48 |

    Extremely basic graphing calculator.

  • 49 |
  • Input/Output

    50 |

    Import and export editor expressions to/from all available formats.

  • 51 |
  • Quiz

    52 |

    Checking inputs against correct answers using math-expressions.

  • 53 |
  • Import

    54 |

    Importing plain text input into the editor using math-expressions.

  • 55 |
  • Article

    56 |

    A mathematical document with expressions rendered.

  • 57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /site/examples/io/codepen_hash: -------------------------------------------------------------------------------- 1 | PxeGzj 2 | -------------------------------------------------------------------------------- /site/examples/io/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: io example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy io example

27 | (See plain example)
28 |

29 | See Guppy io example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/io/io.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Import/Export 5 | 6 | 7 | 8 | 38 | 39 | 40 | 41 |
Input:

42 |
Import:
Clear
43 |
Plain text
44 |
Semantic LaTeX
45 |
AST
46 |
XML

47 |
Edit:

48 |
Export:
LaTeX
49 |
ASCIIMath
50 |
Plain text
51 |
JSON AST
52 |
JSON equation list
53 |
Javascript
54 |
XML

55 |
Output:

56 |
57 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /site/examples/osk/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy OSK 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 |
21 |
22 |

23 |
24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /site/examples/quiz/codepen_hash: -------------------------------------------------------------------------------- 1 | QJrpmV -------------------------------------------------------------------------------- /site/examples/quiz/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: quiz example 6 | 7 | 8 | 9 | 10 | 11 |
12 | 26 |

Guppy quiz example

27 | (See plain example)
28 |

29 | See Guppy quiz example on CodePen. 30 |

31 | 32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/examples/quiz/quiz.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Homework 6 | 7 | 8 | 9 | 10 | 38 | 60 | 61 | 62 | 63 |
    64 |
  • 65 | Express $$((sin(x)^2) + (cos(x)^2))$$ without using any trigonometric functions.
    66 |
    67 |
    Submit
    68 | Unanswered 69 |
  • 70 |
  • 71 | Simplify $$(e^(2 * ln(x)))$$
    72 |
    73 |
    Submit
    74 | Unanswered 75 |
  • 76 |
  • 77 | Find the largest value of x solving: $$(((x^2) - (4 * x)) + 1) = 0$$
    78 |
    79 |
    Submit
    80 | Unanswered 81 |
  • 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /site/examples/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: $title$ 6 | 7 | 8 | 9 | 10 | 11 |
    12 | 26 |

    Guppy $name$ example

    27 | (See plain example)
    28 |

    29 | See Guppy $name$ example on CodePen. 30 |

    31 | 32 |
    33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /site/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 16px; 3 | line-height: 1.5; 4 | } 5 | 6 | .navbar { 7 | margin-bottom: 0px; 8 | } 9 | 10 | .navbar-brand, .navbar-nav li a { 11 | line-height: 100px; 12 | height: 100px; 13 | padding-top: 0; 14 | font-size: 36px; 15 | } 16 | 17 | .navbar-nav li a { 18 | font-size: 16pt; 19 | } 20 | 21 | .navbar-brand { 22 | padding-left: 0; 23 | } 24 | 25 | a.output-select { 26 | padding: 5px; 27 | color: #9cf; 28 | text-decoration: none; 29 | } 30 | 31 | a.output-selected { 32 | border-bottom: 1px solid #fff; 33 | } 34 | 35 | div.highlight input { 36 | color:#333; 37 | } 38 | 39 | div.highlight { 40 | width:100%; 41 | padding:20px; 42 | background-color:#024; 43 | color:#efefef 44 | } 45 | 46 | #guppy1 { 47 | width: 400px; 48 | border: 1px solid black; 49 | padding: 10px; 50 | box-shadow: 1px 1px 1px 0 lightgray inset; 51 | cursor: text; 52 | position:relative; 53 | } 54 | 55 | #result { 56 | width: 800px; 57 | border: 1px solid black; 58 | padding: 10px; 59 | } 60 | 61 | #help_card { 62 | width: 800px; 63 | float: left; 64 | border: 1px solid black; 65 | padding: 10px; 66 | } 67 | 68 | #stuff { 69 | padding-top:10px; 70 | } 71 | -------------------------------------------------------------------------------- /site/index.js: -------------------------------------------------------------------------------- 1 | var g1 2 | window.onload = function() { 3 | output_type = "latex"; 4 | document.getElementById("sample_output").readOnly = true; 5 | Guppy.event("change", update_output); 6 | Guppy.event("completion", completion); 7 | Guppy.configure("empty_content", "{\\text{Click to start typing math!}}"); 8 | Guppy.use_osk(new GuppyOSK({"goto_tab":"qwerty"})); 9 | Guppy.configure("buttons", ["osk","settings","symbols","controls"]); 10 | g1 = new Guppy("guppy1"); 11 | }; 12 | 13 | function select_output(t){ 14 | output_type = t; 15 | update_output({"target": g1}); 16 | var l = document.getElementsByClassName("output-select"); 17 | for(var i = 0; i < l.length; i++){ 18 | var new_class = l[i].getAttribute("class").replace(new RegExp("output-selected","g"),"output-unselected"); 19 | l[i].setAttribute("class", new_class); 20 | } 21 | var cur = document.getElementById("output_"+t); 22 | var new_class = cur.getAttribute("class").replace(new RegExp("output-unselected","g"),"output-selected"); 23 | cur.setAttribute("class", new_class); 24 | } 25 | 26 | function update_output(e){ 27 | try{ 28 | content = e.target.engine.get_content(output_type)+""; 29 | if(content.replace(/\s/g,"").length == 0) content = "Output " + output_type + " will appear here"; 30 | document.getElementById("sample_output").value = content; 31 | } 32 | catch(e){ 33 | document.getElementById("sample_output").value = "Failed to parse input"; 34 | console.log(e.stack); 35 | } 36 | } 37 | 38 | function completion(e) { 39 | document.getElementById("sample_output").value = e.candidates.join(", "); 40 | } 41 | 42 | 43 | (function(stringFromCharCode) { 44 | var fromCodePoint = function(_) { 45 | var codeUnits = [], codeLen = 0, result = ""; 46 | for (var index=0, len = arguments.length; index !== len; ++index) { 47 | var codePoint = +arguments[index]; 48 | // correctly handles all cases including `NaN`, `-Infinity`, `+Infinity` 49 | // The surrounding `!(...)` is required to correctly handle `NaN` cases 50 | // The (codePoint>>>0) === codePoint clause handles decimals and negatives 51 | if (!(codePoint < 0x10FFFF && (codePoint>>>0) === codePoint)) 52 | throw RangeError("Invalid code point: " + codePoint); 53 | if (codePoint <= 0xFFFF) { // BMP code point 54 | codeLen = codeUnits.push(codePoint); 55 | } else { // Astral code point; split in surrogate halves 56 | // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae 57 | codePoint -= 0x10000; 58 | codeLen = codeUnits.push( 59 | (codePoint >> 10) + 0xD800, // highSurrogate 60 | (codePoint % 0x400) + 0xDC00 // lowSurrogate 61 | ); 62 | } 63 | if (codeLen >= 0x3fff) { 64 | result += stringFromCharCode.apply(null, codeUnits); 65 | codeUnits.length = 0; 66 | } 67 | } 68 | return result + stringFromCharCode.apply(null, codeUnits); 69 | }; 70 | try { // IE 8 only supports `Object.defineProperty` on DOM elements 71 | Object.defineProperty(String, "fromCharCode", { 72 | "value": fromCodePoint, "configurable": true, "writable": true 73 | }); 74 | } catch(e) { 75 | String.fromCharCode = fromCodePoint; 76 | } 77 | }(String.fromCharCode)); 78 | 79 | /*! https://mths.be/codepointat v0.2.0 by @mathias */ 80 | (function(stringCharCodeAt) { 81 | 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` 82 | var defineProperty = (function() { 83 | // IE 8 only supports `Object.defineProperty` on DOM elements 84 | try { 85 | var object = {}; 86 | var $defineProperty = Object.defineProperty; 87 | var result = $defineProperty(object, object, object) && $defineProperty; 88 | } catch(error) {} 89 | return result; 90 | }()); 91 | var codePointAt = function(position) { 92 | if (this == null) { 93 | throw TypeError(); 94 | } 95 | var string = String(this); 96 | var size = string.length; 97 | // `ToInteger` 98 | var index = position ? Number(position) : 0; 99 | if (index != index) { // better `isNaN` 100 | index = 0; 101 | } 102 | // Account for out-of-bounds indices: 103 | if (index < 0 || index >= size) { 104 | return undefined; 105 | } 106 | // Get the first code unit 107 | var first = stringCharCodeAt(index); 108 | var second; 109 | if ( // check if it’s the start of a surrogate pair 110 | first >= 0xD800 && first <= 0xDBFF && // high surrogate 111 | size > index + 1 // there is a next code unit 112 | ) { 113 | second = stringCharCodeAt(index + 1); 114 | if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate 115 | // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae 116 | return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; 117 | } 118 | } 119 | return first; 120 | }; 121 | if (defineProperty) { 122 | defineProperty(String, 'charCodeAt', { 123 | 'value': codePointAt, 124 | 'configurable': true, 125 | 'writable': true 126 | }); 127 | } else { 128 | String.charCodeAt = codePointAt; 129 | } 130 | }(String.charCodeAt)); 131 | -------------------------------------------------------------------------------- /site/style/guppy.css: -------------------------------------------------------------------------------- 1 | .guppy_active { 2 | background-color: #ffffff; 3 | } 4 | 5 | .guppy_inactive { 6 | background-color: #fafafa; 7 | } 8 | 9 | .guppy_text_current { 10 | border: 1px solid #ccc; 11 | } 12 | 13 | .guppy_active .main_cursor { 14 | animation: blink-animation 1s steps(2, start) infinite; 15 | -webkit-animation: blink-animation 1s steps(2, start) infinite; 16 | } 17 | 18 | @keyframes blink-animation { 19 | to { visibility: hidden; } 20 | } 21 | 22 | @-webkit-keyframes blink-animation { 23 | to { visibility: hidden; } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /site/style/osk.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height:100%; 3 | } 4 | 5 | .guppy_osk { 6 | position:fixed; 7 | width:100%; 8 | bottom: 0px; 9 | /* border: 1px solid #ccc; */ 10 | } 11 | 12 | .guppy_osk .controls{ 13 | text-align: center; 14 | width: 100%; 15 | background-color: #fff; 16 | padding: 5px; 17 | } 18 | 19 | .guppy_osk .keys { 20 | border: none !important; 21 | } 22 | 23 | .guppy_osk_group { 24 | width: 100%; 25 | text-align: center; 26 | } 27 | 28 | .guppy_osk_group_box { 29 | display: inline-block !important; 30 | border: 0 !important; 31 | padding: 0 !important; 32 | margin:auto; 33 | } 34 | 35 | .guppy_osk .spacer { 36 | display: inline-block; 37 | } 38 | 39 | .guppy_osk .guppy_osk_key { 40 | margin: 3px; 41 | display: inline-block; 42 | justify-content: center; 43 | align-items: center; 44 | min-width: 60px; 45 | line-height:60px; 46 | vertical-align:middle; 47 | text-align: center; 48 | background: #ddd; 49 | border: 1px solid #f9f9f9; 50 | -moz-border-radius: 5px; 51 | -webkit-border-radius: 5px; 52 | } 53 | 54 | .guppy_osk #qwerty .guppy_osk_key, 55 | .guppy_osk .controls .guppy_osk_key, 56 | .guppy_osk #QWERTY .guppy_osk_key, 57 | .guppy_osk #greek .guppy_osk_key { 58 | line-height:40px !important; 59 | height: 40px !important; 60 | } 61 | 62 | .guppy_osk .guppy_osk_key:hover { 63 | position: relative; 64 | top: 1px; 65 | left: 1px; 66 | border: 1px solid #e5e5e5; 67 | cursor: pointer; 68 | } 69 | 70 | .tabbed{ 71 | overflow:hidden; 72 | clear:both; 73 | } 74 | 75 | .tabbed ul{ 76 | list-style-type:none; 77 | /* position:relative; */ 78 | } 79 | 80 | .tabbed li{ 81 | float:left; 82 | cursor: pointer; 83 | } 84 | 85 | .tabbed a{ 86 | display:block; 87 | padding:5px 10px; 88 | background-color: #fff; 89 | color: #000; 90 | text-decoration: none; 91 | margin: 0 5px; 92 | border-top:1px solid #000; 93 | border-left:1px solid #000; 94 | border-right:1px solid #000; 95 | border-bottom: 0; 96 | } 97 | 98 | .tabbed a.active_tab{ 99 | background-color: #7cf; 100 | } 101 | 102 | .tabbed div{ 103 | clear: both; 104 | border:1px solid #ccc; 105 | padding:5px; 106 | display:none; 107 | } 108 | -------------------------------------------------------------------------------- /site/sym/extra_symbols.json: -------------------------------------------------------------------------------- 1 | { 2 | "vec": 3 | {"output":{ 4 | "latex":"\\left\\langle {$1{,}} \\right\\rangle", 5 | "text":"vec({$1{,}})"}, 6 | "current":0, 7 | "group":"array", 8 | "type":"vector" 9 | }, 10 | 11 | "mat": 12 | {"output":{ 13 | "latex":"\\left(\\begin{matrix} {$1{ & }{\\\\}} \\end{matrix}\\right)", 14 | "text":"matrix({$1{,}{;}})"}, 15 | "current":0, 16 | "group":"array", 17 | "type":"matrix" 18 | }, 19 | 20 | "cohom": 21 | {"output":{ 22 | "latex":"H^{{$1}}\\left({$2}\\right)", 23 | "text":"cohomology({$2},{$1})"}, 24 | "current":0, 25 | "group":"topology", 26 | "type":"cohomology", 27 | "attrs":[ 28 | {"up":"2","down":"1","small":"yes","name":"degree"}, 29 | {"up":"2","down":"1","name":"space"} 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /site/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Guppy: $title$ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 | 44 |

    $title$

    45 | $if(toc)$ 46 | $toc$ 47 | $endif$ 48 | $body$ 49 |
    50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/keyboard.js: -------------------------------------------------------------------------------- 1 | var Keyboard = function(){ 2 | this.is_mouse_down = false; 3 | 4 | /* keyboard behaviour definitions */ 5 | 6 | // keys aside from 0-9,a-z,A-Z 7 | this.k_chars = { 8 | "+":"+", 9 | "-":"-", 10 | "*":"*", 11 | ".":"." 12 | }; 13 | this.k_text = { 14 | "/":"/", 15 | "*":"*", 16 | "(":"(", 17 | ")":")", 18 | "<":"<", 19 | ">":">", 20 | "|":"|", 21 | "!":"!", 22 | ",":",", 23 | ".":".", 24 | ";":";", 25 | "=":"=", 26 | "[":"[", 27 | "]":"]", 28 | "@":"@", 29 | "'":"'", 30 | "`":"`", 31 | ":":":", 32 | "\"":"\"", 33 | "?":"?", 34 | "space":" ", 35 | }; 36 | this.k_controls = { 37 | "up":"up", 38 | "down":"down", 39 | "right":"right", 40 | "left":"left", 41 | "alt+k":"up", 42 | "alt+j":"down", 43 | "alt+l":"right", 44 | "alt+h":"left", 45 | "space":"spacebar", 46 | "home":"home", 47 | "end":"end", 48 | "backspace":"backspace", 49 | "del":"delete_key", 50 | "mod+a":"sel_all", 51 | "mod+c":"sel_copy", 52 | "mod+x":"sel_cut", 53 | "mod+v":"sel_paste", 54 | "mod+z":"undo", 55 | "mod+y":"redo", 56 | "enter":"done", 57 | "mod+shift+right":"list_extend_copy_right", 58 | "mod+shift+left":"list_extend_copy_left", 59 | ",":"list_extend_right", 60 | ";":"list_extend_down", 61 | "mod+right":"list_extend_right", 62 | "mod+left":"list_extend_left", 63 | "mod+up":"list_extend_up", 64 | "mod+down":"list_extend_down", 65 | "mod+shift+up":"list_extend_copy_up", 66 | "mod+shift+down":"list_extend_copy_down", 67 | "mod+backspace":"list_remove", 68 | "mod+shift+backspace":"list_remove_row", 69 | "shift+left":"sel_left", 70 | "shift+right":"sel_right", 71 | ")":"right_paren", 72 | "\\":"backslash", 73 | "tab":"tab" 74 | }; 75 | 76 | // Will populate keyboard shortcuts for symbols from symbol files 77 | this.k_syms = {}; 78 | 79 | this.k_raw = "mod+space"; 80 | 81 | var i = 0; 82 | 83 | // letters 84 | 85 | for(i = 65; i <= 90; i++){ 86 | this.k_chars[String.fromCharCode(i).toLowerCase()] = String.fromCharCode(i).toLowerCase(); 87 | this.k_chars['shift+'+String.fromCharCode(i).toLowerCase()] = String.fromCharCode(i).toUpperCase(); 88 | } 89 | 90 | // numbers 91 | 92 | for(i = 48; i <= 57; i++) 93 | this.k_chars[String.fromCharCode(i)] = String.fromCharCode(i); 94 | 95 | } 96 | 97 | 98 | export default Keyboard; 99 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | var Utils = {}; 2 | 3 | Utils.CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 4 | Utils.TEMP_SMALL_CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 5 | Utils.TEMP_CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 6 | Utils.SMALL_CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 7 | Utils.SEL_CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 8 | Utils.SMALL_SEL_CARET = "\\xmlClass{cursor}{\\hspace{0pt}}"; 9 | Utils.SEL_COLOR = "red"; 10 | 11 | Utils.is_blank = function(n){ 12 | return n.firstChild == null || n.firstChild.nodeValue == ''; 13 | } 14 | 15 | Utils.get_length = function(n){ 16 | if(Utils.is_blank(n) || n.nodeName == 'f') return 0 17 | return n.firstChild.nodeValue.length; 18 | } 19 | 20 | Utils.path_to = function(n){ 21 | var name = n.nodeName; 22 | if(name == "m") return "guppy_loc_m"; 23 | var ns = 0; 24 | for(var nn = n; nn != null; nn = nn.previousSibling) if(nn.nodeType == 1 && nn.nodeName == name) ns++; 25 | return Utils.path_to(n.parentNode)+"_"+name+""+ns; 26 | } 27 | 28 | Utils.is_text = function(nn){ 29 | return nn.parentNode.hasAttribute("mode") && (nn.parentNode.getAttribute("mode") == "text" || nn.parentNode.getAttribute("mode") == "symbol"); 30 | } 31 | 32 | Utils.is_char = function(nn){ 33 | for(var n = nn.firstChild; n; n = n.nextSibling){ 34 | if(n.nodeName == "c" || n.nodeName == "l") return false; 35 | } 36 | return true; 37 | } 38 | 39 | Utils.is_symbol = function(nn){ 40 | return nn.parentNode.getAttribute("mode") && nn.parentNode.getAttribute("mode") == "symbol"; 41 | } 42 | 43 | Utils.is_utf8entry = function(nn){ 44 | return nn.parentNode.getAttribute("utf8") && nn.parentNode.getAttribute("utf8") == "entry"; 45 | } 46 | 47 | Utils.is_small = function(nn){ 48 | var n = nn.parentNode; 49 | while(n != null && n.nodeName != 'm'){ 50 | if(n.getAttribute("small") == "yes"){ 51 | return true; 52 | } 53 | n = n.parentNode 54 | while(n != null && n.nodeName != 'c') 55 | n = n.parentNode; 56 | } 57 | return false; 58 | } 59 | 60 | export default Utils; 61 | -------------------------------------------------------------------------------- /src/version.js: -------------------------------------------------------------------------------- 1 | var Version = {} 2 | Version.GUPPY_VERSION = "2.0.0-alpha.1"; 3 | Version.DOC_VERSION = "1.2.0"; 4 | Version.SYMBOL_VERSION = "2.0.0-alpha.3"; 5 | 6 | Version.DOC_ERROR = function(id, found_ver){ 7 | throw Error("Document version mismatch for " + id + ": Found " + found_ver + ", required " + Version.DOC_VERSION + ". To update your document, please see daniel3735928559.github.io/guppy/doc/version.html"); 8 | } 9 | 10 | Version.SYMBOL_ERROR = function(id, found_ver){ 11 | throw Error("Symbol version mismatch for " + id + ": Found " + found_ver + ", required " + Version.SYMBOL_VERSION + ". To update your document, please see daniel3735928559.github.io/guppy/doc/version.html"); 12 | } 13 | export default Version 14 | 15 | -------------------------------------------------------------------------------- /style/guppy.css: -------------------------------------------------------------------------------- 1 | .guppy_active { 2 | border: 2px solid black; 3 | padding: 10px; 4 | box-shadow: 1px 1px 1px 0 lightgray inset; 5 | cursor: text; 6 | background-color: #ffffff; 7 | color:#000; 8 | position:relative; 9 | } 10 | .katex .cursor { 11 | border-left: 1px solid black !important; 12 | width: 0px !important; 13 | margin-right: 0 !important; 14 | margin-left: -1px; 15 | min-height: 1ex; 16 | } 17 | 18 | .guppy_inactive { 19 | border: 2px solid black; 20 | padding: 10px; 21 | box-shadow: 1px 1px 1px 0 lightgray inset; 22 | cursor: text; 23 | background-color: #fafafa; 24 | color:#000; 25 | position:relative; 26 | } 27 | 28 | .guppy_text_current { 29 | border: 1px solid #ccc; 30 | } 31 | 32 | .guppy_active .main_cursor { 33 | animation: blink-animation 1s steps(2, start) infinite; 34 | -webkit-animation: blink-animation 1s steps(2, start) infinite; 35 | } 36 | 37 | .guppy_active .guppy_buttons { 38 | display: block; 39 | } 40 | 41 | .guppy_inactive .guppy_buttons { 42 | display: none; 43 | } 44 | 45 | 46 | .guppy_buttons div.settings{ 47 | background:url('./icons/settings.png') center no-repeat; 48 | } 49 | .guppy_buttons div.keyboard{ 50 | background:url('./icons/keyboard.png') center no-repeat; 51 | } 52 | .guppy_buttons div.help{ 53 | background:url('./icons/help.png') center no-repeat; 54 | } 55 | .guppy_buttons div.symbols{ 56 | background:url('./icons/symbols.png') center no-repeat; 57 | } 58 | 59 | .guppy_buttons { 60 | position:absolute; 61 | bottom:0; 62 | right:0; 63 | padding:0 3px 3px 0; 64 | width:100%; 65 | text-align:right; 66 | } 67 | 68 | .guppy_buttons div.guppy-button{ 69 | background-size: 12px 12px; 70 | cursor:pointer; 71 | height:16px; 72 | width:16px; 73 | padding:3px; 74 | opacity: 0.5; 75 | display: inline-block; 76 | } 77 | 78 | .guppy_buttons img:hover{ 79 | opacity: 1; 80 | } 81 | 82 | @keyframes blink-animation { 83 | to { visibility: hidden; } 84 | } 85 | 86 | @-webkit-keyframes blink-animation { 87 | to { visibility: hidden; } 88 | } 89 | 90 | -------------------------------------------------------------------------------- /style/osk.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height:100%; 3 | } 4 | 5 | .guppy_osk { 6 | position:fixed; 7 | width:100%; 8 | bottom: 0px; 9 | /* border: 1px solid #ccc; */ 10 | } 11 | 12 | .guppy_osk .controls{ 13 | text-align: center; 14 | width: 100%; 15 | background-color: #fff; 16 | padding: 5px; 17 | } 18 | 19 | .guppy_osk .keys { 20 | border: none !important; 21 | } 22 | 23 | .guppy_osk_group { 24 | width: 100%; 25 | min-height:20vh; 26 | background-color:white; 27 | text-align: center; 28 | } 29 | 30 | .guppy_osk_group_box { 31 | display: inline-block !important; 32 | border: 0 !important; 33 | padding: 0 !important; 34 | margin:auto; 35 | } 36 | 37 | .guppy_osk .spacer { 38 | display: inline-block; 39 | height:0; 40 | width:8vw; 41 | } 42 | 43 | .guppy_osk .guppy_osk_key { 44 | margin: .1vh .1vw; 45 | display: inline-block; 46 | justify-content: center; 47 | align-items: center; 48 | min-width: 8vw; 49 | line-height:8vh; 50 | height:8vh; 51 | vertical-align:middle; 52 | text-align: center; 53 | background: #ddd; 54 | border: 1px solid #f9f9f9; 55 | -moz-border-radius: 5px; 56 | -webkit-border-radius: 5px; 57 | } 58 | 59 | .guppy_osk .med_key { 60 | min-width:10vw !important; 61 | } 62 | 63 | /* .guppy_osk #qwerty .guppy_osk_key, */ 64 | /* .guppy_osk .controls .guppy_osk_key, */ 65 | /* .guppy_osk #QWERTY .guppy_osk_key, */ 66 | .guppy_osk .long_key { 67 | min-width:20vw !important; 68 | } 69 | 70 | .guppy_osk .guppy_osk_key:hover { 71 | position: relative; 72 | top: 1px; 73 | left: 1px; 74 | border: 1px solid #e5e5e5; 75 | cursor: pointer; 76 | } 77 | 78 | .tabbed{ 79 | overflow:hidden; 80 | clear:both; 81 | } 82 | 83 | .tabbar{ 84 | width:100%; 85 | text-align:center; 86 | float:left; 87 | background-color:white; 88 | padding:1vh 0 0 0; 89 | } 90 | 91 | .tabbar .scroller-left{ 92 | cursor: pointer; 93 | display:inline-block; 94 | /* border:1px solid black; */ 95 | float:left; 96 | width:8vw; 97 | margin:0 1vw; 98 | min-height:7vh; 99 | line-height:7vh; 100 | } 101 | 102 | .tabbar .scroller-right{ 103 | cursor: pointer; 104 | display:inline-block; 105 | float:left; 106 | /* border:1px solid black; */ 107 | width:8vw; 108 | margin:0 1vw; 109 | min-height:7vh; 110 | line-height:7vh; 111 | } 112 | 113 | .tabbar ul{ 114 | float:left; 115 | white-space:nowrap; 116 | list-style-type:none; 117 | list-style:none; 118 | margin:0 2.5vw; 119 | padding:0; 120 | width:70vw; 121 | overflow-x:hidden; 122 | background: 123 | linear-gradient(to right, white 30%, rgba(255,255,255,0)), 124 | linear-gradient(to right, rgba(255,255,255,0), white 70%) 100% 0, 125 | radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.2), rgba(0,0,0,0)), 126 | radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.2), rgba(0,0,0,0)) 100% 100%; 127 | background-repeat: no-repeat; 128 | background-color: white; 129 | background-size: 40px 100%, 40px 100%, 10px 100%, 10px 100%; 130 | background-attachment: local, local, scroll, scroll; 131 | } 132 | 133 | .tabbar li{ 134 | display:inline-block; 135 | background:rgba(0,0,0,0); 136 | cursor: pointer; 137 | } 138 | 139 | .tabbar a{ 140 | background:rgba(0,0,0,0); 141 | display:block; 142 | padding:5px 10px; 143 | color: #000; 144 | text-decoration: none; 145 | margin: 0 5px; 146 | border-radius: 1vh 1vh 0 0; 147 | border-top:1px solid #000; 148 | border-left:1px solid #000; 149 | border-right:1px solid #000; 150 | border-bottom: 0; 151 | min-height:7vh; 152 | line-height:7vh; 153 | min-width:8vw 154 | } 155 | 156 | .tabbar i { 157 | border: solid black; 158 | border-width: 0 3px 3px 0; 159 | display: inline-block; 160 | padding: 5px; 161 | } 162 | 163 | .tabbar .disabled i { 164 | border: solid #eee !important; 165 | border-width: 0 3px 3px 0 !important; 166 | } 167 | 168 | .tabbar .right { 169 | transform: rotate(-45deg); 170 | -webkit-transform: rotate(-45deg); 171 | } 172 | 173 | .tabbar .left { 174 | transform: rotate(135deg); 175 | -webkit-transform: rotate(135deg); 176 | } 177 | 178 | .tabbar a.active_tab{ 179 | background: #7af; 180 | } 181 | 182 | .tabbar a.fav_tab{ 183 | border-color: #7fa; 184 | } 185 | 186 | /* .tabbar div{ */ 187 | /* clear: both; */ 188 | /* border:1px solid #ccc; */ 189 | /* padding:5px; */ 190 | /* display:none; */ 191 | /* } */ 192 | -------------------------------------------------------------------------------- /sym/number_theory.json: -------------------------------------------------------------------------------- 1 | { 2 | "legendre": 3 | {"output":{ 4 | "latex":"\\left(\\dfrac{{$1}}{{$2}}\\right)", 5 | "small_latex":"\\left(\\frac{{$1}}{{$2}}\\right)", 6 | "text":"leg({$1},{$2})"}, 7 | "current":0, 8 | "type":"legendre", 9 | "group":"number_theory", 10 | "attrs":[ 11 | {"up":"1","down":"2","name":"root"}, 12 | {"up":"1","down":"2","name":"modulus"} 13 | ] 14 | }, 15 | 16 | "Fq": 17 | {"output":{ 18 | "latex":"\\mathbf{F}_{{$1}}", 19 | "text":"GF({$1})"}, 20 | "current":0, 21 | "type":"finite_field", 22 | "group":"number_theory", 23 | "attrs":[ 24 | {"name":"size"}, 25 | ] 26 | }, 27 | 28 | "cohom": 29 | {"output":{ 30 | "latex":"H^{{$1}}\\left({$2}\\right)", 31 | "text":"cohomology({$2},{$1})"}, 32 | "current":0, 33 | "group":"group_theory", 34 | "type":"cohomology", 35 | "attrs":[ 36 | {"up":"2","down":"1","small":"yes","name":"degree"}, 37 | {"up":"2","down":"1","name":"space"} 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Guppy 5 | 6 | 7 | 27 | 55 | 56 | 63 | 64 | 65 |

    66 |

    Status: Running tests, please wait...

    67 |
    68 |
    69 |
    70 |
    71 |
    Code Coverage
    72 | 73 |
    74 | 75 | 76 | --------------------------------------------------------------------------------