├── .gitmodules ├── fonts └── daniel │ ├── daniel.ttf │ ├── danielbd.ttf │ ├── danielbk.ttf │ ├── Daniel Midgley.txt │ └── daniel_700.font.js ├── .gitignore ├── src ├── copyright.js ├── jquery-plugin.js ├── grammar.ebnf ├── grammar.jison ├── diagram.js └── sequence-diagram.js ├── package.json ├── test ├── qunit.html ├── test.html ├── canvg.html ├── qunit.min.css ├── grammar-tests.js ├── underscore-min.js ├── lodash.min.js └── qunit.min.js ├── Makefile ├── LICENCE └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "_site"] 2 | path = _site 3 | url = git@github.com:bramp/js-sequence-diagrams.git 4 | -------------------------------------------------------------------------------- /fonts/daniel/daniel.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magnars/js-sequence-diagrams/master/fonts/daniel/daniel.ttf -------------------------------------------------------------------------------- /fonts/daniel/danielbd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magnars/js-sequence-diagrams/master/fonts/daniel/danielbd.ttf -------------------------------------------------------------------------------- /fonts/daniel/danielbk.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magnars/js-sequence-diagrams/master/fonts/daniel/danielbk.ttf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | grammar.js 2 | diagram-grammar.js 3 | sequence-diagram.js 4 | sequence-diagram-min.js 5 | sequence-diagram-min.js.map 6 | node_modules 7 | build/ 8 | -------------------------------------------------------------------------------- /src/copyright.js: -------------------------------------------------------------------------------- 1 | /** js sequence diagrams 1.0.4 2 | * http://bramp.github.io/js-sequence-diagrams/ 3 | * (c) 2012-2013 Andrew Brampton (bramp.net) 4 | * @license Simplified BSD license. 5 | */ 6 | -------------------------------------------------------------------------------- /src/jquery-plugin.js: -------------------------------------------------------------------------------- 1 | /** js sequence diagrams 2 | * http://bramp.github.io/js-sequence-diagrams/ 3 | * (c) 2012-2013 Andrew Brampton (bramp.net) 4 | * Simplified BSD license. 5 | */ 6 | if (typeof jQuery != 'undefined') { 7 | (function( $ ) { 8 | $.fn.sequenceDiagram = function( options ) { 9 | return this.each(function() { 10 | var $this = $(this); 11 | var diagram = Diagram.parse($this.text()); 12 | $this.html(''); 13 | diagram.drawSVG(this, options); 14 | }); 15 | }; 16 | })( jQuery ); 17 | } -------------------------------------------------------------------------------- /src/grammar.ebnf: -------------------------------------------------------------------------------- 1 | /** js sequence diagrams 2 | * http://bramp.github.io/js-sequence-diagrams/ 3 | * (c) 2012-2013 Andrew Brampton (bramp.net) 4 | * Simplified BSD license. 5 | * 6 | * EBNF version of the grammar for diagraming purposes only 7 | */ 8 | document ::= statement* 9 | 10 | statement ::= 11 | ( 'title' ':' message 12 | | 'participant' actor 13 | | 'note' ('left of' | 'right of' | 'over') actor ':' message 14 | | actor ( '-' | '--' ) ( '>' | '>>' )? actor ':' message 15 | ) 16 | 17 | /* 18 | message ::= [^\n]+ 19 | 20 | actor ::= [^\->:\n,]+ 21 | */ -------------------------------------------------------------------------------- /fonts/daniel/Daniel Midgley.txt: -------------------------------------------------------------------------------- 1 | Thanks for downloading the Daniel font! 2 | 3 | It’s free for you to use for any purpose, commercial or not. 4 | 5 | You can share this font with anyone, as long as this notice is included. 6 | 7 | Please do not distribute modified copies. 8 | 9 | Visit the Page of Fontery 10 | 11 | http://goodreasonblog.blogspot.com/p/fontery.html 12 | 13 | Here’s where you can 14 | - download more of my fonts 15 | - send me an email 16 | - report problems or suggestions 17 | - express your gratitude in the form of donations to keep the fonts coming. 18 | 19 | Be sure to let me know if you use one of my fonts in an interesting, creative, or beautiful way. I may feature your work on the blog. 20 | 21 | This font may not be appropriate for your purposes. It comes with no guarantees of any kind. While I’ve tested this font, and it seems to work well, I accept no responsibility for any unintended consequences of its use. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sequence-diagrams", 3 | "author": "Andrew Brampton (bramp.net)", 4 | "homepage": "http://bramp.github.io/js-sequence-diagrams/", 5 | "filename": "sequence-diagram-min.js", 6 | "version": "1.0.3", 7 | "description": "Generates UML sequence diagrams from simple text", 8 | "license": "BSD", 9 | "readmeFilename": "README.md", 10 | "directories": { 11 | "test": "test" 12 | }, 13 | "dependencies": { 14 | "underscore": "~1.4.x", 15 | "raphael": "~2.1.x" 16 | }, 17 | "devDependencies": { 18 | "//" : "Others include jspp", 19 | "jison": "0.4.6", 20 | "jshint": "~2.0.x", 21 | "uglify-js": "~2.3.x" 22 | }, 23 | "scripts": { 24 | "test": "make test" 25 | }, 26 | "repository": { 27 | "type": "git", 28 | "url": "git://github.com/bramp/js-sequence-diagrams.git" 29 | }, 30 | "keywords": [ 31 | "uml", 32 | "sequence", 33 | "diagram" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /test/qunit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |